Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - .cpp | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
xZeaLitYx

Cheep-cheep
Level: 23

Posts: 6/199
EXP: 66932
For next: 791

Since: 04-13-04

Since last post: 1 day
Last activity: 3 hours
Posted on 04-17-04 04:01 AM Link | Quote
How does one run .cpp files? I've downloaded CCTools for extracting the Chrono Cross script, but they're all .cpp.
Dish

Spiny
Level: 38

Posts: 38/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 04-17-04 04:25 AM Link | Quote
you don't. cpp is the extension for C++ source files.

You can get a C++ compiler and compile the cpp files to form an exe, which you can run.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 451/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 04-17-04 04:33 AM Link | Quote
there are free C++ compilers out there, just do a search for them on google.
Kegan Marius

Micro-Goomba
Level: 8

Posts: 12/18
EXP: 1866
For next: 321

Since: 03-15-04
From: Chico, California, United States of America

Since last post: 553 days
Last activity: 339 days
Posted on 04-19-04 09:19 PM Link | Quote
Case in point: you can get the Microsoft Visual C++ .Net 2003 optimizing compiler and linker for free now at microsoft.com. It's missing a few features, like no IDE, debugger, or profiler, and there's no STL, DirectX, or OpenGL libraries, but if you're only looking for a plain C++ compiler this works.
Jagori

Flurry
Level: 27

Posts: 10/267
EXP: 103625
For next: 12534

Since: 04-17-04

Since last post: 1 day
Last activity: 2 hours
Posted on 04-20-04 02:37 AM Link | Quote
I use Bloodshed Dev C++. Actually, I normally use MS Visual Studio for C++, but I got Bloodshed because it can also compile C. Very good free IDE.
Cellar Dweller

Flurry
!!!
Level: 27

Posts: 42/269
EXP: 107817
For next: 8342

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 04-20-04 09:46 AM Link | Quote
Originally posted by Kegan Marius
Case in point: you can get the Microsoft Visual C++ .Net 2003 optimizing compiler and linker for free now at microsoft.com. It's missing a few features, like no IDE, debugger, or profiler, and there's no STL, DirectX, or OpenGL libraries, but if you're only looking for a plain C++ compiler this works.


Before compiling GUI apps you need the Windows SDK. It is also available for free from Microsoft.

I think that the free compiler does come with STL.

Originally posted by Jagori
I use Bloodshed Dev C++. Actually, I normally use MS Visual Studio for C++, but I got Bloodshed because it can also compile C. Very good free IDE.


You can compile C with Visual Studio. Any adequate C++ compiler should support a C mode and compile C in both C and C++ modes.
Jagori

Flurry
Level: 27

Posts: 11/267
EXP: 103625
For next: 12534

Since: 04-17-04

Since last post: 1 day
Last activity: 2 hours
Posted on 04-20-04 10:08 AM Link | Quote
It can? I'm using MS Visual C++ 6.0 and I can't find it... where would I be able to change this setting? (and I've tried just straight up compiling a C file, and it didn't work). Even if it does work, that's still the reason I got Bloodshed
Kegan Marius

Micro-Goomba
Level: 8

Posts: 13/18
EXP: 1866
For next: 321

Since: 03-15-04
From: Chico, California, United States of America

Since last post: 553 days
Last activity: 339 days
Posted on 04-20-04 11:00 AM Link | Quote
Turn off language extensions. That should do it. I know VC++ 7 has an explicit "compile as C" option but VC++ 6 doesn't. It SHOULD automatically compile as C code if the extension is .c, though.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 468/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 04-20-04 02:25 PM Link | Quote
Originally posted by Jagori
It can? I'm using MS Visual C++ 6.0 and I can't find it... where would I be able to change this setting? (and I've tried just straight up compiling a C file, and it didn't work). Even if it does work, that's still the reason I got Bloodshed


if you want to compile in C mode for Visual Studio without setting anything, you must do the following:

1) have your file end in .C
2) make sure EVERYTHING is declared before you use it

the following code will not compile in C mode

int main()
{
int x = 0;
x = x + x;
int y;
}

however, if the file that was in ended in .cpp, then you will have no problems. the interesting thing is if you use gcc, then you can declare stuff, well local variables anyways, anywhere you want...
Kegan Marius

Micro-Goomba
Level: 8

Posts: 14/18
EXP: 1866
For next: 321

Since: 03-15-04
From: Chico, California, United States of America

Since last post: 553 days
Last activity: 339 days
Posted on 04-20-04 10:04 PM Link | Quote
Originally posted by neotransotaku
Originally posted by Jagori
It can? I'm using MS Visual C++ 6.0 and I can't find it... where would I be able to change this setting? (and I've tried just straight up compiling a C file, and it didn't work). Even if it does work, that's still the reason I got Bloodshed


if you want to compile in C mode for Visual Studio without setting anything, you must do the following:

1) have your file end in .C
2) make sure EVERYTHING is declared before you use it

the following code will not compile in C mode

int main()
{
int x = 0;
x = x + x;
int y;
}

however, if the file that was in ended in .cpp, then you will have no problems. the interesting thing is if you use gcc, then you can declare stuff, well local variables anyways, anywhere you want...


That code wouldn't compile anywhere; you missed the return statement. And unless you're in Windows, which has case-insensitive names, .C is considered C++ as well.

It's also a bad idea to rely on GCC extensions to the C (and C++) language. Chances are the code you write with said extensions won't compile anywhere else. Same goes for VC++, thought the .Net 2003 version is EXTREMELY good about keeping to the standards.


(edited by Kegan Marius on 04-20-04 01:06 PM)
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 470/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 04-21-04 12:22 AM Link | Quote
okay, i missed a return statement... but still, gcc will compile that code and that same code will compile when i use .cpp extension in visual studio 6, but will not compile if i use .c

if you want to write universal c code, then you should just use ANSI C compiler
MathOnNapkins

Math n' Hacks
Level: 67

Posts: 125/2189
EXP: 2495887
For next: 96985

Since: 03-18-04
From: Base Tourian

Since last post: 1 hour
Last activity: 32 min.
Posted on 04-28-04 01:07 AM Link | Quote
Originally posted by xZeaLitYx
How does one run .cpp files?


Sorry Zeality but every time I look at this I get a chuckle.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - .cpp | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.008 seconds.