- Joined
- Oct 16, 2007
- Messages
- 1,886
- Reaction score
- 11
- Points
- 0
- Location
- USA-WA
- Website
- www.orbiter-forum.com
Here is the problem;
Access violation reading location
This is it (shortened)
Before anyone asks, it still doesn't work when you remove the push_back.
Something like this works;
oapiWriteScenario_string(scn,"NAMED","babalu");
No other errors, any ideas?
Access violation reading location
This is it (shortened)
Code:
string name = "hi";
char * buff;
name.push_back(NULL); //append 0 to string so string is 0 terminiated
//name now == 'hi[null]' //just to be sure-
strcpy(buff,name.c_str());
oapiWriteScenario_string(scn,"NAMED",buff);
Before anyone asks, it still doesn't work when you remove the push_back.
Something like this works;
oapiWriteScenario_string(scn,"NAMED","babalu");
No other errors, any ideas?