Thread: sprintf is only getting the null terminate value

  1. #1
    Registered User
    Join Date
    Jul 2015
    Posts
    33

    sprintf is only getting the null terminate value

    I'm trying to use sprintf to get a string value into a char array, but I think it's only getting the last terminated null value for some reason...

    EDIT: nevermind looks like it was because I wasn't copying the value from strtok correctly
    Last edited by jjwooyoung; 11-11-2016 at 12:23 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. assign null value to a struct and check if it is null
    By ymc1g11 in forum C Programming
    Replies: 10
    Last Post: 11-01-2012, 03:58 PM
  2. Replies: 5
    Last Post: 02-12-2010, 08:02 PM
  3. accept(ListenSocket, NULL, NULL); cause program to hang?
    By draggy in forum Networking/Device Communication
    Replies: 11
    Last Post: 06-16-2006, 03:40 PM
  4. Does fgets auto null terminate?
    By chris1985 in forum C Programming
    Replies: 1
    Last Post: 05-08-2005, 11:04 AM
  5. null struct to terminate array of structs?
    By eccles in forum C Programming
    Replies: 6
    Last Post: 01-24-2005, 06:27 AM

Tags for this Thread