JohnGato Posted February 24, 2012 Share Posted February 24, 2012 Look forward to trying New Worlds Engine 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 Quote Link to comment Share on other sites More sharing options...
srachit Posted February 24, 2012 Share Posted February 24, 2012 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? Quote Link to comment Share on other sites More sharing options...
srachit Posted February 24, 2012 Share Posted February 24, 2012 Opps sorry for hijacking the thread, i guess we can take it into another chat :P Or Alain could we possibly have a c++ board? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2012 Share Posted February 24, 2012 Moved posts to a new location... please feel free to continue to share your C++ (nightmares) here. /me abandoned C++ quiet some time ago... simply too painful and not all that useful for what I do anymore. Quote Link to comment Share on other sites More sharing options...
srachit Posted February 24, 2012 Share Posted February 24, 2012 Alain I know uptill structures in c++ and I can make basic programes like bank managment etc, what should I learn next in c++? Classes or how to work c++ with database? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2012 Share Posted February 24, 2012 Well you should ask yourself why you want to learn C++ first... I would say database / web development and even GUI are not really the right target for C++ development. Quote Link to comment Share on other sites More sharing options...
srachit Posted February 24, 2012 Share Posted February 24, 2012 I didnt mean database as in for web development, I meant to store the information locally, right now for my bank program for example, what happens is that I input user details etc but once I switch off the program the user details are lost. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2012 Share Posted February 24, 2012 that's called data persistence / serialization or in many other ways. You have tons of solutions for that, even XML could be one. Quote Link to comment Share on other sites More sharing options...
srachit Posted February 24, 2012 Share Posted February 24, 2012 I see, do you think right now it would be more important for me to concentrate on c++ concepts like classes objects pointers etc or take a quick swing at data persistance? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2012 Share Posted February 24, 2012 for sure the concepts. all remaining is... basically useless Quote Link to comment Share on other sites More sharing options...
Nickson Posted February 24, 2012 Share Posted February 24, 2012 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! Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2012 Share Posted February 24, 2012 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). Quote Link to comment Share on other sites More sharing options...
Nickson Posted February 24, 2012 Share Posted February 24, 2012 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. Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 24, 2012 Share Posted February 24, 2012 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. Quote Link to comment Share on other sites More sharing options...
JohnGato Posted February 25, 2012 Author Share Posted February 25, 2012 LOL wow I was like when did I create this thread LMAO Actually I am in my first semester of C++ , we just started working on inputs and outputs, just the basics right now Quote Link to comment Share on other sites More sharing options...
Nickson Posted February 25, 2012 Share Posted February 25, 2012 Good! Exactly where you should start ... the basics :-P no point in trying to jump in the middle of all the action. You'll get lost, especially in C/C++ as it doesn't leave a lot of room for mistakes, which wouldn't even be considered mistakes in other languages. Quote Link to comment Share on other sites More sharing options...
JohnGato Posted February 25, 2012 Author Share Posted February 25, 2012 oh man i have found that out really well so far missing ; here and there are killing me LOL Quote Link to comment Share on other sites More sharing options...
srachit Posted February 25, 2012 Share Posted February 25, 2012 oh man i have found that out really well so far missing ; here and there are killing me LOL In my theory paper I missed ' ' and I lost 2 marks straight :P Oh and the difference between == and = also manages to confuse me everytime :P Quote Link to comment Share on other sites More sharing options...
srachit Posted February 25, 2012 Share Posted February 25, 2012 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? Quote Link to comment Share on other sites More sharing options...
Spudinski Posted February 25, 2012 Share Posted February 25, 2012 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/ Quote Link to comment Share on other sites More sharing options...
srachit Posted February 25, 2012 Share Posted February 25, 2012 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! :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.