• Log in or sign up for an account here: https://www.sythe.org/login

Compiling?

Status
Not open for further replies.

LMCampbell

Active Member
Joined
Oct 6, 2009
Sythe Gold
0
Messages
165
Location
ClanSupport.co.uk
Hi, I'm trying to learn C++ from a book (Herbert Schildt) C++ a Beginner's Guide.

I've just started and when it comes to compiling it says i should use te visual basic 2005-2008 command prompt compiler.
When i use it, it doesn't work.

Code- C:\...>cl -GX Sample.cpp

Any help would be appreciated and if you need more detail i will add.

Thanks :)
 
Member of the Month Winner
Sythe's 10th Anniversary
Erm... If you're going to ask for help it'd probably do you a lot of good to post what kind of errors you're getting. We can't help you if you just say "it doesn't work."

Also, the code that you're using may help as well.
 
You can use any C++ compiler for compiling C++ source ^.^

I started out using Dev-CPP compiler, from bloodshed. You can google it.
I use Visual C++ as well.

If you already have Visual C++ 2008 Express Edition, or 2005, to make a new program for DOS windows, do the following:

Look up at the top left corner of the window, and choose:

File >> New >> Project

adjay9.png


To the left, choose win32 >> Console Application
Then at the bottom, fill out the name of your project.
vffbzs.png


On the left (again), right-click "Source Files" and choose "New File".
Once the interface opens up, choose ".CPP" and name it whatever you want.

Here's a very basic DOS program:

Code:
#include <iostream>
using namespace std;

int main()
{
   cout << "This is my program, lawlz";
   cin.get();

   return 0;
}
 
Status
Not open for further replies.
duelarena.gg
Back
Top