char* filename; // memory location: 0065FA98
char* outfile; // memory location: 0065FA94
when changed, the other "overlaps" each other's input. help?
char* filename; // memory location: 0065FA98
char* outfile; // memory location: 0065FA94
when changed, the other "overlaps" each other's input. help?
Yoshi
Not necessarily. Can I see the context in which you are using this? For now I what you are saying isn't true. But maybe your code needs a little fixing.
now, is 0065FA98 the value of filename or &filename?Originally posted by Wraith_Master
char* filename; // memory location: 0065FA98
char* outfile; // memory location: 0065FA94
when changed, the other "overlaps" each other's input. help?
hello, internet!
are you sure? where are you getting these numbers from?
hello, internet!
I'm guessing wraith_master is doing one of the following:
Either way that sounds correct to me. A pointer is only four bytes. So being 4 bytes appart in memory isn't so strange to me. A pointer points to memory, not to a block of memory the way an array does. I just don't see the problem here.Code:std::cout << (void *)filename << std::endl; //or printf("%p", filename);
exactly what i was thinking. if he is printing them that way, then it is &filename who'se value is 65FA98. and since that's the address of the pointer var itself, all is fine as you described.Originally posted by master5001
I'm guessing wraith_master is doing one of the following:
Either way that sounds correct to me. A pointer is only four bytes. So being 4 bytes appart in memory isn't so strange to me. A pointer points to memory, not to a block of memory the way an array does. I just don't see the problem here.Code:std::cout << (void *)filename << std::endl; //or printf("%p", filename);
hello, internet!