Dev-c Syntax Error At End Of Input
Contents |
Programming Boards C Programming Syntax error at end of input?!!? Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ FAQ | Get
Syntax Error At End Of Input Postgresql
a compiler | Fixes for common problems Thread: Syntax error at end of syntax error at end of input sql input?!!? Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch syntax error at end of input postgres to Threaded Mode 04-05-2012 #1 Makara View Profile View Forum Posts Registered User Join Date Dec 2011 Posts 24 Syntax error at end of input?!!? I really don't understand where is my mistake.Can you help,
Syntax Error Unexpected End Of Input
please? This is the part of the code where the error is. Code: int BSTSearch(BinTreePointer Root, BinTreeElementType KeyValue) { BinTreePointer LocPtr; boolean Found; LocPtr = Root; Found = FALSE; int level; level = 1; while (!Found && LocPtr != NULL) { while (!(Found) && (LocPtr) != NULL) { if (KeyValue < (LocPtr)->Data) { (LocPtr) = (LocPtr)->LChild; level++; } else if (KeyValue > (LocPtr)->Data) { (LocPtr) = (LocPtr)->RChild; level++; } else
Syntax Error Unexpected End Of Input Ruby
(Found) = TRUE; } return level; } void BSTLevel(BinTreePointer Root,BinTreePointer KeyValue) { if (Root!=NULL) { BSTLevel(Root->LChild, KeyValue); printf("The level of %c is: %d \n",Root->Data, BSTSearch (KeyValue, Root->Data)); BSTLevel(Root->RChild, KeyValue); } }//this is actually line 136 This is what I get when I compile: In function `BSTSearch': 136 syntax error at end of input 04-05-2012 #2 laserlight View Profile View Forum Posts Visit Homepage C++ Witch Join Date Oct 2003 Location Singapore Posts 25,447 Heh, you made a mistake with your indentation that led to an optical illusion. Here is your code, correctly indented: Code: int BSTSearch(BinTreePointer Root, BinTreeElementType KeyValue) { BinTreePointer LocPtr; boolean Found; LocPtr = Root; Found = FALSE; int level; level = 1; while (!Found && LocPtr != NULL) { while (!(Found) && (LocPtr) != NULL) { if (KeyValue < (LocPtr)->Data) { (LocPtr) = (LocPtr)->LChild; level++; } else if (KeyValue > (LocPtr)->Data) { (LocPtr) = (LocPtr)->RChild; level++; } else (Found) = TRUE; } return level; } void BSTLevel(BinTreePointer Root,BinTreePointer KeyValue) { if (Root!=NULL) { BSTLevel(Root->LChild, KeyValue); printf("The level of %c is: %d \n",Root->Data, BSTSearch (KeyValue, Root->Data)); BSTLevel(Root->RChild, KeyValue); } }//this is actually line 136 Spot the problem now? EDIT: I can understand if you want to write: Code: while (!Found && (LocPtr != NULL)) But
main() { using std::cout; using std::endl; baseDMA shirt("Portabelly", 8); lacksDMA balloon("red", "Blimpo", syntax error unexpected end of input ajax 4); hasDMA map("Mercator", "Buffalo Keys", 5); cout << shirt
Syntax Error Unexpected End Of Input Javascript
<< endl; cout << balloon << endl; cout << map << endl; lacksDMA balloon2(balloon); hasDMA syntax error unexpected end of input node map2; map2 = map; cout << balloon2 << endl; cout << map2 << endl; return 0; } /*This is line 44*/ And when compiling http://cboard.cprogramming.com/c-programming/147478-syntax-error-end-input.html with g++, I am given this response: usedma.cpp:44:1: error: expected ‘}’ at end of input usedma.cpp:44:1: error: expected unqualified-id at end of input Now, I'm not too sure as to what is going on here. Surely it recognizes a '}'. I am grateful for any input. Thank you. Last http://www.cplusplus.com/forum/unices/58150/ edited on Dec 23, 2011 at 9:38pm UTC Dec 23, 2011 at 10:44pm UTC Aramil of Elixia (772) no that means you have one too many of these also it would be nice if you showed ur whole code Dec 23, 2011 at 10:44pm UTC Aramil of Elixia (772) cause the problem is at line 44 Dec 23, 2011 at 11:14pm UTC Ben Duncan (163) I'll introduce the other files: dma.h 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef DMA_H_ #define DMA_H_ #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/15844622/syntax-error-expected-declaration-at-end-of-input Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs http://stackoverflow.com/questions/13355300/error-expected-at-end-of-input-when-there-is-one Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax Error: expected declaration at end of input up vote -4 down vote favorite I keep getting a strange syntax error that syntax error i've never seen before, and I'm not sure what's the problem with it. Can I get some extra eyes to help me figure out what the problem is? the error reads: error: expected declaration or statement at end of input the bold line is what it highlights as the error. void draw(int deck[SIZE]) { int i; for(i = 0; i < 5; i++) { cards; putchar('\n'); } void cards() { char suits[4][9] = { end of input "Hearts", "Diamonds", "Clubs", "Spades"}; for(i=0; i here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error: expected ‘}’ at end of input — when there is one [closed] up vote -1 down vote favorite 3 I am getting this error when compiling: project6.cpp: In function ‘int main()’: project6.cpp:187: error: expected ‘}’ at end of input However, there is clearly an end bracket to my int main () function at that line, so I am confused as to why I am getting this error. I also checked all of my other brackets and found none that were not closed. Any help would be much appreciated! #include