Former Member
inherit
guest@proboards.com
77583
0
Nov 28, 2024 17:18:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jan 25, 2013 18:15:12 GMT -8
Okay, so I'm taking C++ classes. A fair warning to those of you who don't already know: I'm a total idiot and this will probably be a really stupid question. It took me forever just to teach myself JavaScript, so...
Anyway! I'm using a compiler, as suggested by my textbook. It's Microsoft Visual Studio Express (or somethin' like that) and I can't get my stupid .cpp file to run. It's nothing wrong with the code, because I've compared his source to mine several times and they're identical. I'm doing something wrong with the program and I have no idea what.
There is no "compile" button like he suggests there is in the textbook. When I tried Googling it, people seemed to use compile/build buttons interchangeably, but selecting Build only opens up a saving dialog for a .sln file. The "debug" button just gives me an error saying that the system file doesn't exist. I created a project and placed the .cpp file inside its folder, but now the .cpp file can't even be built/debugged, much less compiled with an invisible "compile" button.
He didn't really go into any depth about how I should be saving/arranging/executing the file, just programming it. Since he didn't dedicate even a sentence or two explaining how I should be doing this, I know it just has to be easy. I just can't figure it out.
This thing is due in four hours, but even if it's after I'd still like to know for future reference. I'm ripping my hair out over here. :\
|
|
inherit
58586
0
Oct 24, 2024 16:15:35 GMT -8
Omio
Quack.
2,358
September 2005
omio
|
Post by Omio on Jan 25, 2013 18:21:51 GMT -8
You probably need to change your view settings. Otherwise, F5 compiles, and does a debug test.
EDIT: Aside from that, you may want to try to save the project first. [.sln or .suo I think]
|
|
Former Member
inherit
guest@proboards.com
77583
0
Nov 28, 2024 17:18:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jan 25, 2013 18:30:44 GMT -8
You probably need to change your view settings. Otherwise, F5 compiles, and does a debug test. EDIT: Aside from that, you may want to try to save the project first. [.sln or .suo I think] It only wants me to save it as .sln when I hit the Build button, and it calls it a solution. Is that necessary? My book doesn't say anything about solution files (not in the first three chapters, at any rate). I've saved the project itself several times (and deleted it and created a new project about ten times, too!) When it's saved in a project folder, it won't let me debug/build it either. I've already messed with all my view settings. There's still no compile button. EDIT: At first it told me no directory existed for the solution file when I tried to save it. I created a new project and tried again and it allowed me to save one, but it hasn't changed anything.
|
|
inherit
58586
0
Oct 24, 2024 16:15:35 GMT -8
Omio
Quack.
2,358
September 2005
omio
|
Post by Omio on Jan 25, 2013 18:41:12 GMT -8
You probably need to change your view settings. Otherwise, F5 compiles, and does a debug test. EDIT: Aside from that, you may want to try to save the project first. [.sln or .suo I think] It only wants me to save it as .sln when I hit the Build button, and it calls it a solution. Is that necessary? My book doesn't say anything about solution files (not in the first three chapters, at any rate). I've saved the project itself several times (and deleted it and created a new project about ten times, too!) When it's saved in a project folder, it won't let me debug/build it either. I've already messed with all my view settings. There's still no compile button. EDIT: At first it told me no directory existed for the solution file when I tried to save it. I created a new project and tried again and it allowed me to save one, but it hasn't changed anything. 1) Start a new console application/solution, and just save that, blank. See how that goes. 2) Visual Studio 2012 or 2010? 3) If you get step one to follow through, try println("Hello World"); to see if it will compile that [and maybe run].
|
|
Former Member
inherit
guest@proboards.com
77583
0
Nov 28, 2024 17:18:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jan 25, 2013 18:52:10 GMT -8
There's still no compile button. Debugging/building gave me an error.
It's Visual Studio 2010, as the book recommended.
Am I supposed to be selecting console application from the list of types of projects when I begin a new one?
Here's what they want me to do:
// "Game Over" assignment // costhoff@iwcc.edu
#include <iostream>
using std::cout; using std::endl;
int main() { cout << "Game Over!" << endl; return 0; }
|
|
inherit
58586
0
Oct 24, 2024 16:15:35 GMT -8
Omio
Quack.
2,358
September 2005
omio
|
Post by Omio on Jan 25, 2013 18:53:51 GMT -8
Yes, you're making a console application, and yeah, forgot it's cout for C++. Too used to C#. ><;
EDIT: Also, I think the using statements aren't needed. EDIT #2: Can we discuss the rest via AIM or something? This is getting a bit cumbersome, no offense.
|
|
Former Member
inherit
guest@proboards.com
77583
0
Nov 28, 2024 17:18:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jan 25, 2013 19:26:50 GMT -8
Yes, you're making a console application, and yeah, forgot it's cout for C++. Too used to C#. ><; EDIT: Also, I think the using statements aren't needed. EDIT #2: Can we discuss the rest via AIM or something? This is getting a bit cumbersome, no offense. The using statements aren't needed, but it's a requirement for this assignment to show that we know how to use them. As I've said, there's nothing wrong with the code itself. I've quadruple-checked it against the "cheat sheet" source. Yes, I'll get off the laptop and get on AIM, but it'll be a few minutes. Hope you're still around. ;_;
|
|
inherit
58586
0
Oct 24, 2024 16:15:35 GMT -8
Omio
Quack.
2,358
September 2005
omio
|
Post by Omio on Jan 25, 2013 19:34:20 GMT -8
Yes, you're making a console application, and yeah, forgot it's cout for C++. Too used to C#. ><; EDIT: Also, I think the using statements aren't needed. EDIT #2: Can we discuss the rest via AIM or something? This is getting a bit cumbersome, no offense. The using statements aren't needed, but it's a requirement for this assignment to show that we know how to use them. As I've said, there's nothing wrong with the code itself. I've quadruple-checked it against the "cheat sheet" source. Yes, I'll get off the laptop and get on AIM, but it'll be a few minutes. Hope you're still around. ;_; Probably will be around for a bit more. Shouldn't take long to fix.
|
|
Former Member
inherit
guest@proboards.com
77583
0
Nov 28, 2024 17:18:32 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jan 25, 2013 20:21:58 GMT -8
This has been solved by the great and powerful Omio.
|
|
olala
New Member
dood
Posts: 87
inherit
dood
195172
0
Mar 17, 2016 23:46:31 GMT -8
olala
87
June 2013
olala
|
Post by olala on Jun 17, 2013 6:04:54 GMT -8
do you mean kind of questbook?what complier method you used?hope its not vb,im totally noob about advance class:P,thats why i hate vb( just wonderin whats all this source about:P using std:: cout ;using std:: endl ;int main() {cout << "dunt forget about the _ dood:P!" << endl; return 0;) }dood:)
|
|
inherit
lilly_andrew@live.com
195630
0
Sept 13, 2013 4:26:20 GMT -8
lillyandrew
10
June 2013
lillyandrew
|
Post by lillyandrew on Jul 28, 2013 20:24:19 GMT -8
You probably need to change your view settings. Otherwise, F5 compiles, and does a debug test.
|
|
inherit
john2shan@gmail.com
197602
0
Jul 29, 2013 23:30:55 GMT -8
john2shan
1
July 2013
john2shan
|
Post by john2shan on Jul 29, 2013 23:29:49 GMT -8
Oh I remember when I started my college study - I used to have almost the same problems.... You feel dumb and helpless, it's awful! But I must say, this won't last for ever, you are only at the beginning of a long and hard way. You are doing right by asking questions on forums, etc. I'm glad you managed to solve the problem, good luck!
|
|