Does this create a pointer to a char array on the heap that stores "Testing 1, 2, 3\n" ?Code:char *nchar = "Testing 1, 2, 3\n";
Does this create a pointer to a char array on the heap that stores "Testing 1, 2, 3\n" ?Code:char *nchar = "Testing 1, 2, 3\n";
Usually the heap means a chunk of memory that you can use by allocating parts of it with new. String literals don't have to be on the heap and they're usually put in some kind of read only memory. Where it goes depends on the compiler that you use.
Processing error: Stupidity detected.
------------------------------
Dr. Bebop
Windows XP Professional Ed.
Microsoft Visual Studio 6