lol, the function is only 1 line though
:D
Type: Posts; User: thegr8n8
lol, the function is only 1 line though
:D
why did you change it to a const?
okay lets put this char* thing on hold. Lets move towards a diffrent function I have been working on.
int stringToInt(string paraString)
{
return atoi (paraString.c_str());
}
Is this...
okay here is a header of one of the functions to that networking engine:
double writestring(char*str, double buffid)
{
CBuffer*buff = (CBuffer*)buffers.item((int)buffid);
if(buff ==...
this :
size_t tempsize = size_t(str.size());
char *temp = new char[tempsize + 1UL];
str.copy (temp, tempsize);
temp[tempsize] = '\0';
foo (&temp[0], tempsize);
delete[] temp;
I am now confused
I am using this networking engine.
but alot of functions I use only accept char*.
How would you declare a char* normally?
because I declared alot of my char*s like this:
char* variable = "stuff";
this way brings up warnings.
ah I see now, so how would one go from string to regular char* then?
lol well sorry this was an error message for a diffrent thing I was doing:
string playerName = "Nathan";
char* = playerName.c_str();
that is where the error message appears at
bad conversion from const char* to char*.....
doesn't winsock solve alot of these problems?
splendid also how did you get a signature?
Okay I am about to go try that, but what exactly is stringstream, it looks like cout all over, but copied into a string.
Okay here is the psuedocode of what I want to do
void openFile(int inputNumber)
{
char* = "//folder//" + inputNumber + ".txt"
}
unfortunately that is not how you append to the end of...
In C++ whats the best way tofor me to create an object and have it wait 1 minute before echoing a message? Please note it will be in a while loop(duh or else program will close/end).
okay here is a function that doesn't even have string as a return type, but uses string and has it in the header, but it gets errors on every variable declared as a string!
int...
I am using strings in a program I am writing, however whenever I try to make a string the return type of the function, I get tons of errors saying that its not a real type.
How would I make a...