View previous topic - View next topic |
Author |
Message |
Jihgfed Pumpkinhead Stephen Hawking
Joined: 21 Jan 2003 Posts: 259 Location: Toronto, Canada
|
Posted: Sat Jul 19, 2003 7:02 pm Post subject: Headers and Such |
[quote] |
|
Yes, that's true, I hadn't considered templates. But as you said, it's true like 99% of the time, so hopefully it's just a small "by the way".
Frankly, all the standard headers scare me. There's just so many macros and crazy stuff... I'm glad I don't have to deal with them most of the time.
And I had no idea that c and c++ headers were differentiated (although it certainly makes sense that they should be). Is that a "rule", i.e., recommended by some sort of semi-legitimate authority, or just common practice? It doesn't really matter, I suppose, I'm just curious; I'll go change all my headers now.
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Sat Jul 19, 2003 7:43 pm Post subject: |
[quote] |
|
The C++ Standard does not AFAIK mention any header file extension, and the standard headers have no extension. However, .hpp header files are used by Boost, which was formed by members of the C++ Standards Committee Library Working Group to establish "existing practice" and provide reference implementations of new C++ libraries for eventual standardization. In other words, .hpp is almost, but not quite, "official".
|
|
Back to top |
|
|
LeoDraco Demon Hunter
Joined: 24 Jun 2003 Posts: 584 Location: Riverside, South Cali
|
Posted: Sat Jul 19, 2003 10:46 pm Post subject: |
[quote] |
|
From what I understood, it was more "standard" to not actually label a c++ header file with an extension, just as the STL headers are labeled. _________________ "...LeoDraco is a pompus git..." -- Mandrake
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Sat Jul 19, 2003 11:12 pm Post subject: |
[quote] |
|
It is my understanding that the extensionless style of the standard library headers is not intended to be used by ordinary programmers. The reason it exists is that the standard library headers don't have to be actual files. Their contents could be hardcoded in the compiler for example.
|
|
Back to top |
|
|
LeoDraco Demon Hunter
Joined: 24 Jun 2003 Posts: 584 Location: Riverside, South Cali
|
Posted: Sun Jul 20, 2003 1:16 am Post subject: |
[quote] |
|
*Shrugs* One of my professors mentioned the style to me. Not that professors are always rote perfect about things (especially industry standards), but this guy is fairly active in Industry. _________________ "...LeoDraco is a pompus git..." -- Mandrake
|
|
Back to top |
|
|
Y treefingers Y I wanna be a ballerina!
Joined: 21 Apr 2003 Posts: 29
|
Posted: Mon Jul 21, 2003 3:08 pm Post subject: |
[quote] |
|
anyway, i figured out some of the problems...its my directories do all of my headers and libraries...but i got one linker error now...it says "g++: No input files"
any ideas? (BTW: im using Dev-C++ 4, not 5)
if this doesnt work out w/directx, then im just going to buy a compiler
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Mon Jul 21, 2003 4:30 pm Post subject: |
[quote] |
|
Y treefingers Y wrote: | anyway, i figured out some of the problems...its my directories do all of my headers and libraries...but i got one linker error now...it says "g++: No input files" |
What it means should be obvious, what causes it less so. Can you post the command line for g++?
Quote: | if this doesnt work out w/directx, then im just going to buy a compiler |
Why not try using SDL or Allegro instead? I wouldn't touch DirectX directly unless I really had to, because the API for SDL is so much nicer. (Of course I wouldn't touch Dev-C++ either; I edit with VIM and compile with both MinGW and Visual C++ from the command line.)
|
|
Back to top |
|
|
Y treefingers Y I wanna be a ballerina!
Joined: 21 Apr 2003 Posts: 29
|
Posted: Mon Jul 21, 2003 7:09 pm Post subject: |
[quote] |
|
sorry, but i have no idea what G++ is, or mingw....(my teacher never taught us that stuff) so i cant help you on your question about it
i dont really want to go to allegro or SDL because i already started up on directX...im not having any trouble learning, its just i want to program some examples so i can actually make something later (or now)
i saw Visual C++ .net at Compusa yesterday for $110 (BTW...is .net a web programming part for it?)
|
|
Back to top |
|
|
Rainer Deyke Demon Hunter
Joined: 05 Jun 2002 Posts: 672
|
Posted: Mon Jul 21, 2003 10:40 pm Post subject: |
[quote] |
|
Y treefingers Y wrote: | sorry, but i have no idea what G++ is, or mingw....(my teacher never taught us that stuff) so i cant help you on your question about it |
Dev-C++ is not a compiler, it's an IDE (integrated development environment) front-end for gcc (GNU C compiler). There are two versions of gcc for Windows: MinGW and cygwin. IIRC Dev-C++ comes with MinGW. g++ is gcc in C++ mode.
When you ask Dev-C++ to compile and link your program, it calls gcc to do the actual work. It does this by passing through a command line, since gcc is a command line utility. I think Dev-C++ has some way of telling you what the command line is - either in the project settings or in the build window - but I haven't used Dev-C++ in ages, so I'm not sure where exactly.
Code: | i dont really want to go to allegro or SDL because i already started up on directX...im not having any trouble learning, its just i want to program some examples so i can actually make something later (or now) |
I also learned DirectX. Then I found out about SDL, tried it, and I haven't gone back to DirectX since. So, yes, it's definitely possible to learn DirectX, and no, I don't think it's a good idea. Error handling in DirectX is particularily nasty, as just about every function can return a wide variety of error codes which must be handled. But whatever, it's your life.
Quote: |
i saw Visual C++ .net at Compusa yesterday for $110 (BTW...is .net a web programming part for it?) |
.net is the latest version of Visual C++, also called version 7. It refers to the .net framework (which is a totally useless Java-style virtual machine, and has nothing to do with the internet), but you can still compile normal C++ programs normally. Watch out for the standard or academic edition of Visual C++, which has optimizations disabled. If you want to generate fast code, you need at least the professional edition.
|
|
Back to top |
|
|
Y treefingers Y I wanna be a ballerina!
Joined: 21 Apr 2003 Posts: 29
|
Posted: Mon Jul 21, 2003 11:12 pm Post subject: |
[quote] |
|
ooh, i see now. well, i have a book on directX (and RPG's ) called
"Programming RPG's with directX" by Jim Adams. so im not learning off of some guy that has no name on the internet. thanks for everyones help (and i think i'll go with VC++....whenever i get money...)
|
|
Back to top |
|
|
|
Page 3 of 3 |
All times are GMT Goto page Previous 1, 2, 3
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|