Jump to content
MakeWebGames

C++ programming


JohnGato
 Share

Recommended Posts

Look forward to trying this out hopefully this weekend...... Since my classes are becoming more intense I havent been able to keep up with this.

I actually started writing my own C++ programs for the first time so that has been fun and challenging

Oh you're learning c++? So am I! :D

Where have you reached till now?

Link to comment
Share on other sites

Well, I haven't really used C++ a lot, I was busy more with just C, not that it's such a huge difference.

If you're up for the challenge, write a decent UI and make it work with a mysql database over the LAN. and in the end make it run on linux. I'll be happy to test it for you ;)

btw, if there relly is a decent interest in C/C++, we'll add a board for it, but that will only done when there are enough actual posts on the forum, here in other programming!

Link to comment
Share on other sites

For user interface I strongly suggest QT. However as said, I don't believe C++ is that much a good language for it. Use Java or C# for interfaces / database / web development and more.

C++ is good for driver development, low level development, and high performance or embedded systems. C on the other side is good to understand how really code works (like pointers, pointers to functions and more).

Link to comment
Share on other sites

That is why we learned C, it was merely to understand how the basics of programming work, like you said. We never made any real user interfaces or connect to other services. We did make a small console game, which was either fisherman or 4 in a row.

Still, I don't mind them trying. The experience will learn them something somehow.

Link to comment
Share on other sites

For sure it is EXTREMELY useful. I would say you will never really have a good understanding of programming till you managed to understand pointers and pointers to functions. Why? Well even in PHP or Java where pointers are mostly hidden you find from time to time "references" which are nothing else as pointers (or related to pointers). Also understand how things work under allow you some times to grab more easily further concepts.

Link to comment
Share on other sites

Okay C++ question,

I have made a banking program, a library program and a random number guessing game all small projects in different files.

Now I was windering is it possible in C++ to make a central file which will call these files?

I'm thinking maybe a switch statement and if you input 1 it will call the banking program if you input 2 the library program and so on, can someone tell me if this is possible and if it is what is the code to call another file?

Link to comment
Share on other sites

Okay C++ question,

I have made a banking program, a library program and a random number guessing game all small projects in different files.

Now I was windering is it possible in C++ to make a central file which will call these files?

I'm thinking maybe a switch statement and if you input 1 it will call the banking program if you input 2 the library program and so on, can someone tell me if this is possible and if it is what is the code to call another file?

A question about modular programming in C++. Oh the joys.

To answer it, yes, it's possible to link the files.

AFAIK, sources files are converted to .obj's, and linked together after compilation by the linker to form the lib/executable. You do not need to per say "include them", as it's linked afterwards. I'm not saying "#include <myfile.c>" won't work(it will), it's just not very proper to do so.

What you do rather in C/++/insert-random-descendant-here, is create header files. Those are very easy to spot, as they carry an extension .h.

One would define the functions(among others) in there, and then include it in the main .c script, eg. "#include <myfunc.h>".

Ref 1: http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

Ref 2: http://en.wikipedia.org/wiki/Header_file

Ref 3: http://www.cplusplus.com/forum/articles/10627/

Link to comment
Share on other sites

A question about modular programming in C++. Oh the joys.

To answer it, yes, it's possible to link the files.

AFAIK, sources files are converted to .obj's, and linked together after compilation by the linker to form the lib/executable. You do not need to per say "include them", as it's linked afterwards. I'm not saying "#include <myfile.c>" won't work(it will), it's just not very proper to do so.

What you do rather in C/++/insert-random-descendant-here, is create header files. Those are very easy to spot, as they carry an extension .h.

One would define the functions(among others) in there, and then include it in the main .c script, eg. "#include <myfunc.h>".

Ref 1: http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

Ref 2: http://en.wikipedia.org/wiki/Header_file

Ref 3: http://www.cplusplus.com/forum/articles/10627/

Thanks! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...