Jump to content
  • Advertisement
  • entries
    383
  • comments
    1075
  • views
    353330

Just an Update - no real title required

Sign in to follow this  
Trapper Zoid

70 views

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.
Sign in to follow this  


2 Comments


Recommended Comments

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]

Share this comment


Link to comment
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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!