Click here to Skip to main content
15,891,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Thread Pin
CPallini18-Feb-09 3:01
mveCPallini18-Feb-09 3:01 
GeneralRe: Thread Pin
David Crow18-Feb-09 3:09
David Crow18-Feb-09 3:09 
GeneralRe: Thread Pin
Luc Pattyn18-Feb-09 3:26
sitebuilderLuc Pattyn18-Feb-09 3:26 
GeneralRe: Thread Pin
David Crow18-Feb-09 3:28
David Crow18-Feb-09 3:28 
GeneralRe: Thread Pin
Luc Pattyn18-Feb-09 3:37
sitebuilderLuc Pattyn18-Feb-09 3:37 
GeneralRe: Thread Pin
Arman S.18-Feb-09 2:17
Arman S.18-Feb-09 2:17 
QuestionProblem with Array of char* Pin
error140818-Feb-09 0:05
error140818-Feb-09 0:05 
AnswerRe: Problem with Array of char* Pin
Sarath C18-Feb-09 0:15
Sarath C18-Feb-09 0:15 
You can simply initialize the array as follows.
char *token[256] = { 0 };

strtok return a char* (array of character) not a single char.

See the example on using strtok taken from msdn. Read the documentation before using it.
#include <string.h>
#include <stdio.h>

	char string[] = "A string\tof ,,tokens\nand some  more tokens";
	char seps[]   = " ,\t\n";
	char *token;

	int main( void )
	{
		printf( "Tokens:\n" );

		// Establish string and get the first token:
		token = strtok( string, seps ); // C4996
		// Note: strtok is deprecated; consider using strtok_s instead
		while( token != NULL )
		{
			// While there are tokens in "string"
			printf( " %s\n", token );

			// Get next token: 
			token = strtok( NULL, seps ); // C4996
		}
	}
</stdio.h></string.h>


-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin

AnswerRe: Problem with Array of char* Pin
«_Superman_»18-Feb-09 0:40
professional«_Superman_»18-Feb-09 0:40 
AnswerRe: Problem with Array of char* Pin
CPallini18-Feb-09 0:44
mveCPallini18-Feb-09 0:44 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 1:16
error140818-Feb-09 1:16 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 1:56
mveCPallini18-Feb-09 1:56 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 2:10
error140818-Feb-09 2:10 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 2:28
mveCPallini18-Feb-09 2:28 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 2:40
error140818-Feb-09 2:40 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 3:10
mveCPallini18-Feb-09 3:10 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 3:13
error140818-Feb-09 3:13 
GeneralRe: Problem with Array of char* Pin
CPallini18-Feb-09 3:18
mveCPallini18-Feb-09 3:18 
GeneralRe: Problem with Array of char* Pin
Arman S.18-Feb-09 2:03
Arman S.18-Feb-09 2:03 
QuestionRe: Problem with Array of char* Pin
David Crow18-Feb-09 3:19
David Crow18-Feb-09 3:19 
AnswerRe: Problem with Array of char* Pin
error140818-Feb-09 5:25
error140818-Feb-09 5:25 
GeneralRe: Problem with Array of char* Pin
David Crow18-Feb-09 5:30
David Crow18-Feb-09 5:30 
GeneralRe: Problem with Array of char* Pin
error140818-Feb-09 6:00
error140818-Feb-09 6:00 
GeneralRe: Problem with Array of char* Pin
David Crow18-Feb-09 6:06
David Crow18-Feb-09 6:06 
GeneralRe: Problem with Array of char* Pin
ilostmyid218-Feb-09 19:32
professionalilostmyid218-Feb-09 19:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.