Sponsored Content
Top Forums Programming Need hep with my semantic error Post 302742145 by fwrlfo on Monday 10th of December 2012 03:36:12 PM
Old 12-10-2012
ok thank you Eng. Corona688
the mistake was
Code:
while(EOF != (c = fgetc(filePtr))) 
 {

    if ((c == ' ') || (c == '\n') || (c == '\0'))
    {
        if (c == '\0')
        {
            continue;
        }
	
	printf(cc); // don't assign it as string
	printf("%c\n");
	i=0;
	memset(cc, 0, sizeof cc);

    }
	else
	{ 
	cc[i]=c;
	i++;
	} 
	 
	

  }

 

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

syntax and semantic check

Does the shell perform a syntax and semantic check before commands are sent to the kernel? Ravioli (3 Replies)
Discussion started by: ravioli
3 Replies

2. UNIX for Dummies Questions & Answers

Hep with script to monitor directory

Hello, I am a newbie who is attempting to write a script to monitor a directory for a set of 3 files that I am expecting to get ftp'd. Occasionally, we suspend operations for maintenance etc. but we still get the files so there can be more than 1 set. If there is more than 1 set, I would like... (2 Replies)
Discussion started by: cmf00186
2 Replies

3. Programming

Tool for checking syntactic and semantic mistakes

Hello, it is easy to make mistake in c code. What ide or tool are you using for checking syntactic and semantic mistakes? Jarda (1 Reply)
Discussion started by: berk
1 Replies
All times are GMT -4. The time now is 06:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy