Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
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 |
| ||
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 |
| ||
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 |
| ||
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 |
| ||
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 |
| ||
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. |
| ||
Originally posted by Kegan Marius 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 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 |
| ||
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 |
| ||
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 |
| ||
Originally posted by Jagori 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() 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 |
| ||
Originally posted by neotransotakuOriginally posted by Jagori 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 |
| ||
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. |
| ||
Originally posted by xZeaLitYx 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 | | | |