Just an Update - no real title required

Published October 31, 2006
Advertisement
Random Thoughts for the Day
Why does not having a newline character at the end of a C++ file get flagged as a compiler warning? It's really giving me the irrits.

Progress on my game engine PE-1 and Ice Slider has slowed a bit in the last few days, mostly due to my lack of energy. Not sure whether it was some sort of bug (of the illness variety, not the code) or just general tiredness, although there's been a lot of it going around my research lab lately. Nothing too serious, but it did mean I tended to zone out when staring at a screen full of C++ code, or got stuck on rather boneheaded bugs for way too long. I guess stuff like that just happens from time to time.

Another minor snag is from my policy of making up the design as I go. I've been fleshing out how to do the GUI and menu system while simultaneously figuring out how to handle input (got a real basic system running but it's pretty ugly). Given I want to make this engine vaguely reusable I've cycled through many different architectural design decisions on the fly, only to scrap them once I write some code headers and realise there's problems. At the moment I'm going with a vaguely Java-esque system of a class hierarchy of graphical elements and container classes to easily throw together graphical overlay systems. It's overkill for Ice Slider, but hopefully it will come in handy when I get to games that require resizable windows.

However this tendency to blow out the design should be curtailed, as I wanted to get up to the gameplay prototpying stage by the start of November. As it stands and given I'm heading away this weekend I probably won't be able to get there until the end of next week. It's time to set some deadlines - so I'll force myself to finish the prototype menuing and input systems by the end of next weekend. If my grandiose design system isn't ready by then I'll just have to make do with a hacked together makeshift system for Ice Slider version 1, and fix it on the engine rewrite.
Previous Entry Learning my A B Cs
Next Entry Back in town
0 likes 2 comments

Comments

HopeDagger
Quote:Why does not having a newline character at the end of a C++ file get flagged as a compiler warning? It's really giving me the irrits.


Mind you that it's only the GCC compiler that gives this warning; MSVC couldn't care less. However, I believe the newline at the end is part of the C++ standard, and smells like it's related to some portability issues.

I'm using Dev-C++ at the moment (for experimentation, really) and it automatically adds the newline at the end if I forget it; which I always do. In short, it's a it's-a-pain-but-we-blindly-follow-it sort of thing. Sort of like Windows. [grin]
October 31, 2006 11:29 PM
Trapper Zoid
Quote:Original post by HopeDagger
Mind you that it's only the GCC compiler that gives this warning; MSVC couldn't care less. However, I believe the newline at the end is part of the C++ standard, and smells like it's related to some portability issues.

I'm using Dev-C++ at the moment (for experimentation, really) and it automatically adds the newline at the end if I forget it; which I always do. In short, it's a it's-a-pain-but-we-blindly-follow-it sort of thing. Sort of like Windows. [grin]

Ah, that makes some sort of sense. It's just really annoying that I get caught out on that every single time I add another function to my files.

October 31, 2006 11:58 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement