@ elad:
I thought I pointed to whatever strtok() returns, but I found no explicit explanation what strtok() really does...
Type: Posts; User: Zwen
@ elad:
I thought I pointed to whatever strtok() returns, but I found no explicit explanation what strtok() really does...
(ok, it's my first script in c++ so it became a little dirty... and long... and over-nested...)
I employ strtok() in one part of the programm and get char* var_Desk. Then I want to check, what...
Unfortunately the compiler tells me that now parameter 2 cannot be changed from 'char' to 'const char*'...
I would like to strcpy() the content of the memoryblock pointed on by my_pointer to my_variable.
strcpy (my_variable, my_pointer);Of course it does not work. How can I solve it?
Thank You.
@ Sebastiani: that's it - thank you :)
hehe ;) - sorry, but that's not the problem.
The string is returned by a function an only in certain cases it must be empty...
so I need to return an EMPTY string:
cout << string << endl;needs...
How do I empty a string to obtain an empty line whe I "cout" it?
Works great. Thanks a lot :)
@ ripper079:
I wanted to convert "C1;;;4;;1;" into something that looks like this string: "C1;0;0;4;0;1;".
I tried strtok() but it just removes the ";" and returns: "C1 4 1".
Is there a way to...
How can I insert characters into a string?
Example:
{R5;;;;1;;1;} ---> {R5;0;0;0;1;0;1;}
This is what I already know :
strtok() returns a pointer to a string that includes the delimiter AND replaces the delimiter by NULL.
That means: in case there are two delimiters in a row (like ;;)...
What does strtok return when it finds "nothing" between two delimiters? (It seams that it is not NULL).
I need to insert a character between two deliniters, but cannot find any if-condition for...
Sorry! Ignore my last post - found mistake.
Thanks for all replies!
I already tried strtok. It had Problems returning tokens like ' - + / '. Any Idea, why?
lkv_Pointer = strtok (lkv_String, ";");
while (lkv_Pointer != NULL)
{
cout << lkv_Pointer << endl;...
Is there a function to substract certain charakters from a string?
My string contains masses of ';' between various characters that I want to process.
Thanx.