Thread: Garbbage in the variable

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    7

    Garbage in the variable

    Hello everyone... I am having a problem with a couple of variables.

    I declare the variable as char jar[100]=" ", tmp[6]=" ", cup[6]=" ";

    In the watch window the value for tmp & cup looks like this: " \000\000\000", but not jar.
    As a consequence the program is not running properly. Any thoughts about this problem? Let me know them...

    I am learning how to program in c++ win32 application on Code::Blocks 10.05 running on win xp... Thanx
    Last edited by Secured; 03-02-2011 at 11:31 PM. Reason: garbbage

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Realloc problem, environment variables Linux C
    By yodakohl in forum C Programming
    Replies: 4
    Last Post: 01-05-2011, 07:04 PM
  2. Pointers
    By MrMatt027 in forum C++ Programming
    Replies: 14
    Last Post: 12-10-2010, 04:32 PM
  3. Question about printing a variable???
    By Hoser83 in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2006, 01:57 PM
  4. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 12:07 PM
  5. Replies: 2
    Last Post: 04-12-2004, 01:37 AM