Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
1
2 Commented Posts
0 Endorsements
Ranked #2K
~19.9K People Reached
Favorite Forums
Favorite Tags

18 Posted Topics

Member Avatar for Albino
Member Avatar for Albino

Errors: 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(239): error C2065: 'string' : undeclared identifier 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(239): error C2146: syntax error : missing ';' before identifier 'str' 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(239): error C2065: 'str' : undeclared identifier Code: `string str;` For some reason strings are giving me errors.

Member Avatar for Ancient Dragon
0
169
Member Avatar for paul9519
Member Avatar for jongiambi

#include <iostream> #include <string> using namespace std; class Airport { private: string arrivals[4]; string newArrival; public: Airport(); void setArrival(string newArrival); string getArrival(); bool isArrived(const Airport &airport); bool isFull(const Airport &airport); }; struct Airplane { string airline; string city; }; int main() { int x, y, b, c, z; bool power …

Member Avatar for WaltP
0
300
Member Avatar for new_developer

This would work as long as the numbers contain only one digit. #include <iostream> #include <sstream> #include <string> using namespace std; int main() { int a, b, c; cout << "First: "; cin >> a; cout << "\nSecond: "; cin >> b; a = a * 10; c = a …

Member Avatar for TrustyTony
0
14K
Member Avatar for Albino

Errors: 1>main.cpp(9): error C2143: syntax error : missing ')' before 'constant' 1>main.cpp(9): error C2143: syntax error : missing ';' before 'constant' 1>main.cpp(9): error C2059: syntax error : ')' 1>main.cpp(63): error C2660: 'checker' : function does not take 9 arguments 1>main.cpp(71): error C2143: syntax error : missing ')' before 'constant' 1>main.cpp(71): …

Member Avatar for Albino
0
365
Member Avatar for poloblue
Member Avatar for Albino

struct pieces { string ap, bp, cp, dp, ep, fp, gp, hp, ip, jp, lr, rr, lk, rk, lb, rb, q, k; } b, w; Code 1>c:\users\will\documents\visual studio 2010\projects\chess\chess\pieces.h(3): error C2146: syntax error : missing ';' before identifier 'ap' 1>c:\users\will\documents\visual studio 2010\projects\chess\chess\pieces.h(3): error C4430: missing type specifier - int assumed. …

Member Avatar for Albino
0
279
Member Avatar for vytenis555
Member Avatar for existinglady

Strings can hold spaces as long as you use getline(). If you're going for a string for each word, you could try using arrays or two `cin >> example;`'s. [Beginner Tutorial](http://www.cplusplus.com/doc/tutorial/introduction/)

Member Avatar for Lucaci Andrew
0
414
Member Avatar for poloblue

You have to declare your file variables like so: `offile outCalenderFile`.

Member Avatar for Schol-R-LEA
0
401
Member Avatar for funkey100

What happens if you don't type in an option on the menu and then try to exit? If you don't type a correct command in it calls main(), which is an integer. The exit command returns 0 so the function never returns anything. I suggest adding a `return 0;` after …

Member Avatar for Schol-R-LEA
0
313
Member Avatar for Albino

I have a problem. 1>------ Build started: Project: SDL Test, Configuration: Debug Win32 ------ 1> playa.cpp 1> main.cpp 1> Generating Code... 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths return a value 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths …

Member Avatar for Albino
0
470
Member Avatar for nuclear

What Chris said, also you have to update your surface after you blit. This: if( SDL_Flip( screen ) == -1 ) { return 1; } updates your screen. You're probably going to want to put it into a loop too.

Member Avatar for nuclear
0
234
Member Avatar for cool_zephyr
Member Avatar for tubzz

Shouldn't the boolean "isDuplicate" go before the integer "getScores", so there aren't initialization errors?

Member Avatar for deceptikon
0
673
Member Avatar for tubzz

#include <iostream> #include <fstream> #include <string> using namespace std; bool load_files() { infile.open("input.txt"); if (!infile.is_open) return false; outfile.open("output.txt"); if(!infile.is_open) return false; return true; } void main() { int y = 0; int x; int z = 0; ifstream infile; ofstream outfile; if (load_files() == false) return 1; if(!infile.is_open) cout<<"The input …

Member Avatar for tubzz
0
191
Member Avatar for sutty8303

The End.