An innovative, experienced solutions architect with strong focus on public cloud architecture, solution design and leading technical team. Zhen has 15 years experience designing and implementing a wide spectrum of enterprise level solutions. In the last 4 years, he is committed to evangelising Azure, DevOps and Scrum. His recent focus are enterprise digitisation, cloud governance, reference architecture, IoT, Big Data, Microservices, AWS.
Wednesday, May 6, 2009
cygwin shell syntax error near unexpected token
This is a common error and the reason is your are using Windows to create the file. Thus the line break is \r\n rather than \n.
All you need to do is change the format using a system command:
dos2unix filename_here
4 comments:
Anonymous
said...
Don't know why but it works now. Thnaks a lot from Spain. p.d. I have to write it every time when im compiling a program?
4 comments:
Don't know why but it works now. Thnaks a lot from Spain.
p.d. I have to write it every time when im compiling a program?
I am getting a syntax error near unexpected token '$'\r''
And I do not see the error can you help me out.
#include
main()
{
int iNumber = 30;
int *iPtr = NULL;
iPtr = &iNumber;
printf("\n*iPtr = %p\n", iPtr, &iNumber);
printf("\nThe value is: %d\n", iPtr, iNumber);
}
I figured it out.
I am stumped I have errors on line 12,13,17,18,19. Could you give me a clue at what I have done wrong?
#include
int cPtr(char []);
int cCharacter(char []);
main()
{
const int iNumber = 30;
int *iPtr = NULL;
const int fFloat = 3.123456;
int *fNumber = 0.0;
const char *cPtr[] = 'A';
*iPtr = &iNumber;
*fFloat = &fNumber;
*cPtr = &cCharacter;
printf("\nThe Value of iNumber: %d\n", iPtr, &iNumber);
printf("\nThe Address of *iPtr = %p\n", iPtr, &iNumber);
printf("\nThe Value of fNumber: %d\n", fFloat, &fNumber);
printf("\nThe Address of *fFloat = %p\n", fFloat, &fNumber);
printf("\nThe Value of cCharacter: %c\n", cPtr, &cCharacter);
printf("\nThe Address of cPtr = %p\n", cPtr, &cCharacter);
}
Post a Comment