Okay, Iv'e finished learning C++. What can I do with it? Specifically, I want to do some graphics stuff, anything beyond iostream and fstream. What comes after C++? I know it does more than this. If I could just have a function to set a pixel, I could make my own functions for lines and circles and even 3d and whatever else. I've heard of OpenGL and Direct3D, and I know they're API's. What exactly is an API? What does it do, how is it different from other things? Does it just let you access hardware abilities? For now, I just want the simplest, most basic, easy-to-use method for outputting a pixel. I've heard of GUI programming, what is it (beyond what it stands for :rolleyes: ) ? And if I were to learn an API or different, complicated graphics thingy, what's the difference between them? I know D3D is for Windows and OpenGL is portable and entirely high-level, i've read some articles and stuff trying to find something fun to do with C++, but nothing is very specific. Any information would be helpful, I would like to know every practical option available. I use Windows XP and Dev-C++.

>>Okay, Iv'e finished learning C++.

:cheesy: :cheesy: :cheesy: :cheesy: :cheesy: :cheesy: you will NEVER be finished learning c++. That is a life-long task.

If you want to learn MS-Windows GUI programming here is a good introduction. Its c instead of c++ but then so is all the win32 api functions (not one of them are c++ because they can be called from many different programming languages).

Okay, I've finished learning C++.

HAHAHA:lol:

What can I do with it? Specifically, I want to do some graphics stuff, anything beyond iostream and fstream. What comes after C++? I know it does more than this.

Come up with a project. Once you know what you want to write, either start writing a library for it (if one is needed), or find a library someone else has written and use that.

What exactly is an API? What does it do, how is it different from other things? Does it just let you access hardware abilities?

An API is an interface for (typically) a library. It provides certain functions for you to use, and then it does the nitty-gritty behind the scenes. You don't need to know how the nitty-gritty gets done, and the API won't tell you. It'll just do it.

I've heard of GUI programming, what is it (beyond what it stands for :rolleyes: )?

It's just like it sounds, making graphical user interfaces for your programs.

Yay, Wikipedia! Oddly enough, I never tried API in Wikipedia, although I've put almost everything else i could think of in it. And also oddly enough, I have that exact link already in favorites waiting for me to wade through it. (Dragon's tutorial, that is.) I know you never really finish learning C++, I just meant like I finished learning the basic language and enough to understand most of the concepts and techniques, even if not the applications, tricks, uses of the individual techniques and infinite things it can do. This coming from one who just previously knew almost nothing of programming beyond idle BASIC-like programs made on my school-issued TI calculator during, yes, school. I want to know everything I can learn to do right now (that can be integrated and used with C++, as it's my current and only base to work from), and more advice from the awesome people in DaniWeb. Is the Win32 API where I should start now? Anything else I should/might be interested in at this early stage?

I dont know how good the book is...I'm sure you can read reviews on Amazon.com but maybe this is a good start?

Beginning Game Programming
Price: $23.09

Book description from publisher's homepage:

If you are hooked on video games and have a basic knowledge of C++ and visual programming, you will be hooked on Beginning Game Programming. Clear, practical lessons based on C++ programming are the basis of this book's lessons. By focusing on the Windows API to construct games, you will learn game theory in double-buffered graphics, sprite animation, digitized sound effects and music. A fully functional game engine provided on CD, along with tools, code and graphics, will give you the ability to create your own games in the future. Learn the art and science of game programming with help from Beginning Game Programming.

I found another link that answers what your asking as well:
http://www.toymaker.info/Games/html/beginners.html

Hidden in the DaniWeb C++ code snippets is an example of using WinAPI SetPixel() that allows you to put a pixel at the specified x,y coordinates, and also uses the color you give it. The example shows a sine wave, but as long as your mathematics holds out, you can draw a large wealth of things. Take a look at the snippet at:
http://www.daniweb.com/code/snippet217.html

... at where?

Wow thanks awesomeness. Visited by the almighty cscgal too. And WinAPI is the same as the Win32 API right?

Yes if your OS is 32 bit windows OS and if it is 64 bit OS then just call it Win64 API :)

How would i specify a Win32 project in Dev-C++? All that's listed is console, windows app, static library (.a), DLL and empty project.

How would i specify a Win32 project in Dev-C++? All that's listed is console, windows app, static library (.a), DLL and empty project.

Win32 == windows app

ahahah, I knew that :o

thanks

If you are talking about the SetPixel() snippet, that is a Console Application in Dev-C++ parlance. Windows Applications are fullblown Windows GUI programs with frames, buttons, labels, event loops and so on.

This is an example of the simplest Windows Application ...

#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	MessageBox(NULL, "\tHello World!", "My first windows app", NULL);
	return 0;
}

Notice the function main() syntax has changed slightly.

You might say, if it uses the windows.h header, then it is a Win32 program.

I experimented with the SetPixel() function in console mode as suggested by Vega, it has renewed my interest in C++. It's nice to know I can indeed do something beyond text stuff. I just made a quick bouncing ball thingy, now I'm done with that phase, I can stand to sit and read the WinAPI tutorial linked at the beginning. I admit the first time it shocked me a bit to see that it took 70 lines to set up a real, empty window. I can read it now though, I've reminded myself that there are fun things in this language.

BTW, I tried SetPixel() in Windows App mode, purely by accident, and it did indeed create a sin wave in the top left corner of my screen on top of my compiler. Not that there was any reason it wouldn't have, I just thought it was interesting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.