New to C++ but not programming

Hi Guys

I'm in a real pickle and was hoping one of you could help out; I've been programming for many years in various BASIC languages but stopped a number of years back and never bothered to learn C, C++ or Visual Basic. I am learning C++ and it seems fairly straight-forward in terms of design and syntax, but I'm having real trouble getting everything to work together, for example I have recently tried writing a simple program that shows a black background and produces snow-flakes which fall down the screen and build up at the bottom (I saw a similar program years ago on the Amiga), I can work out how to create the snow flakes, how to decide whether they move left or right and how they fall down the screen, the only thing I can't seem to work out is how to draw them on the screen. I thought originally about using a bitmap image of a snowflake, but couldn't work out how to implement it, so then I thought about simply using pixels, but again, can't work out how to do it, please help someone.

Thanks

Marto
Are you using any GUI?
Last edited on
Graphics aren't as easy to use as it may look like...

If you're new to C++, I would recommend to first get the basics of the language down for yourself using console applications. After that, you could learn how to use OpenGL, Allegro, SDL or someting like that (or you could download a library that does the complicated stuff for you) and use it for graphics.

About the snowprogram: you could always use '*' instead of 'real' snowflakes.
In order to make nice console graphics, you could use curses or windows.h
Hi guys, thanks for all the responses, I really apreciate it, I've pretty much got to grips with the language itself, its just the graphics side of it, just plotting pixels on the screen would do and I understand that GDI is a graphics interface that is built in to Windows (#include <windows.h>) and can display single pixels but I'm damned if I can work out how, any ideas?
This link: http://www.daniweb.com/code/snippet217.html
shows a sample on how drawing pixels on a console.
If you are constructing you own window, that should be the same.

(You will have to refresh the window if you want to make snowfakes moving)

Some reference on GDI http://msdn.microsoft.com/en-us/library/ms536795(VS.85).aspx
And GDI+ http://msdn.microsoft.com/en-us/library/ms533802(VS.85).aspx
Last edited on
thanks Bazzy, you're a great help, I've just checked out the daniweb example and it is so simple I could kick myself, thanks ever so much mate
Topic archived. No new replies allowed.