Good C++ Forum?
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Good C++ Forum?
Anybody who writes C++ here, do you have a forum that you really like? I'm starting on a little project of mine, and require some assistance.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Good C++ Forum?
Just plain C++ or are you using a framework like MFC, wxWidgets, Qt, etc?
If you are doing anything Windows, I would strongly suggest CodeProject. Qt or wxWidgets, google a forum for those. Pretty much any forum for C__ will have a small community around plain C++
I would suggest joining CodeProject
Cheers,
Alex
If you are doing anything Windows, I would strongly suggest CodeProject. Qt or wxWidgets, google a forum for those. Pretty much any forum for C__ will have a small community around plain C++
I would suggest joining CodeProject
Cheers,
Alex
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Good C++ Forum?
I'm planning on creating a graphical program. I did some research and came to a non-finalized decision to use wxWidgets because of native widget cross-platform-ness (not correct?)... I did not realize it was a framework
I mainly use Linux. Is it your opinion that low level programming is easier/better on Windows?
I mainly use Linux. Is it your opinion that low level programming is easier/better on Windows?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Good C++ Forum?
Framework is a loosely defined term, wxWidgets call themselves a toolkit, which is anyones guess why. It's more than a simple library of functions or classes though. All Windowing frameworks will impose some architectural decisions on you, if anything, the hierarchy of components, whether you like it or not.I'm planning on creating a graphical program. I did some research and came to a non-finalized decision to use wxWidgets because of native widget cross-platform-ness (not correct?)... I did not realize it was a framework
Low level programming? Depends. If were talking real low level, like just using the CRT the programming on Linux and WIndows is pretty much the same experience. If were dealing with the native API's (still without a framework/abstraction library) then Windows is easier, IMO, simply because I am very familiar with the Windows SDK, I have only a laymen understanding of how Linux and it's signals and slots approach work. I am sure I could quickly learn the Linux style, but using a framework like wxWidgets or Qt would make that un-nessecary(sp?).I mainly use Linux. Is it your opinion that low level programming is easier/better on Windows?
Cheers,
Alex
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Good C++ Forum?
I'd like to create a program that is largely cross-platform, with only minor changes needed for each (by low level, I mean lower than scripting lang.s like PHP, e.g. C??).
The issue is, I'm defining parameters while I really know nothing about this stuff. I'll google for some tutorials on how to get started... do you know of any that you would recommend?
The issue is, I'm defining parameters while I really know nothing about this stuff. I'll google for some tutorials on how to get started... do you know of any that you would recommend?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Good C++ Forum?
I could recommend a dozen books, but I have no clue what your experience level is. Are you proficient in C/C++? If you are just learning and have a basic understanding of pointers, templates, etc. Using a framework like Qt is going to make things more difficult.The issue is, I'm defining parameters while I really know nothing about this stuff. I'll google for some tutorials on how to get started... do you know of any that you would recommend?
I have only really tinkered with wxWidgets and Qt, so I cannot really suggest a book specific to them, MFC or OWL on the other hand I could. I would just start with the basic Hello World tutorials on wxWidgets web site, or Google Qt basics.
http://www.wxwidgets.org/docs/tutorials/hello.htm
Cheers,
Alex
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Good C++ Forum?
In my entire life, I've written no more and no less than twenty-six lines of C++. I just finished getting wxWidgets installed and built the Hello World example.PCSpectra wrote:but I have no clue what your experience level is
Thanks for the link, I hadn't found that one yet.
Last edited by Jonah Bron on Fri Sep 17, 2010 12:48 pm, edited 1 time in total.
Re: Good C++ Forum?
If you're looking to get started with C/C++, the following list of resources should be helpful - http://www.webdesignish.com/best-and-fr ... enses.html
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Good C++ Forum?
Thanks Pytrin. I downloaded Thinking in C++, and will start reading it some time.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Good C++ Forum?
Yikes. Haha. I would say starting with wxWidgets framework is going backwards, but i personally chose to learn low-level C/C++ then STL, then Windows SDK, then OWL then MFC. Actually I lie, STL came in during my learning MFC. I am a ground up learner, whereas some people can do the top down approach, which is what you are doing, so ignore everything I just said if it discourages you.In my entire life, I've written no more and no less than twenty-six lines of C++. I just finished getting wxWidgets installed and built the Hello World example.
Thinking in C++ by Bruce Eckel is an excellent book, so I second that choice.
Actually the original C Programming book by K & R is quite good as well, although the version I have is so dated, it's almost obsolete. :p
Pointers and type-casting is what I found most confusing in learning C/C++ and polymorphism isn't implicit as it is in PHP, so if you have any experience in PHP and OOP watch out for that.
Thinking in C++ I purchased and never gave it away, it's one of those books I can still reference and learn something from. If you can read through that cover to cover and comprehend everything your doing good. Then ask questions in forums and read articles on topics that confuse you, pointers will probably stall you more than once, so read as many articles as you can find.
Templates, Pointers, STL are the basics of learning C++ - when you move into a Window'ing framework, you start learning about events, class hierarchies, multi-threading, etc. Actually MT isn't connected to Window'ing frameworks at all, but I never built any MT daemons, one single threadded console apps, so that is at least my experience.
Cheers,
Alex
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Good C++ Forum?
I am normally a ground-up learner, but in this case I have a specific purpose for learning C++, and obviously that can push one faster than one would normally like to go.PCSpectra wrote:I would say starting with wxWidgets framework is going backwards, but i personally chose to learn low-level C/C++ then STL, then Windows SDK, then OWL then MFC. Actually I lie, STL came in during my learning MFC. I am a ground up learner, whereas some people can do the top down approach, which is what you are doing, so ignore everything I just said if it discourages you.
Good, sounds like a good choice then.PCSpectra wrote:Thinking in C++ I purchased and never gave it away, it's one of those books I can still reference and learn something from. If you can read through that cover to cover and comprehend everything your doing good. Then ask questions in forums and read articles on topics that confuse you, pointers will probably stall you more than once, so read as many articles as you can find.
To protect myself from mis-implementing more advanced practices, I'll try to start with a few basic apps.PCSpectra wrote:Templates, Pointers, STL are the basics of learning C++ - when you move into a Window'ing framework, you start learning about events, class hierarchies, multi-threading, etc. Actually MT isn't connected to Window'ing frameworks at all, but I never built any MT daemons, one single threadded console apps, so that is at least my experience.
Re: Good C++ Forum?
I'd recommend Java.Jonah Bron wrote:I'd like to create a program that is largely cross-platform, with only minor changes needed for each (by low level, I mean lower than scripting lang.s like PHP, e.g. C??).
http://en.wikipedia.org/wiki/Java_%28pr ... PrinciplesOne characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any supported hardware/operating-system platform.
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Good C++ Forum?
By cross platform, I mean just Win/Mac/Linux, nothing really beyond that. What major advantages does Java have over C? Doesn't Java require that the user have the JVM installed?
Forgot to mention PCSpectra, I have in the past written a couple of simple apps with Visual Basic.
Forgot to mention PCSpectra, I have in the past written a couple of simple apps with Visual Basic.
Re: Good C++ Forum?
Yes they need the JVM to run your java app, but thats the point. The JVM abstracts out the differences in platforms, so your apps automatically run on Win/Mac/Linux. Also its higher level than C++
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Good C++ Forum?
I have nothing against Java the language, but the technology. Java apps run slower and look Java-ish. With the exception of basic Windows Java appears to implement their own control stack, so things like tabs, list boxes, etc are Java powered, which means more abstraction and a less consistent interface with the native operating system.By cross platform, I mean just Win/Mac/Linux, nothing really beyond that. What major advantages does Java have over C? Doesn't Java require that the user have the JVM installed?
Forgot to mention PCSpectra, I have in the past written a couple of simple apps with Visual Basic.
C++ frameworks on the other hand, usually use the native OS controls, when you compile the application for one platform or another, the pre-processor conditionals determine which API to use:
Windows:
Code: Select all
HWND WINAPI CreateWindow(
__in_opt LPCTSTR lpClassName,
__in_opt LPCTSTR lpWindowName,
__in DWORD dwStyle,
__in int x,
__in int y,
__in int nWidth,
__in int nHeight,
__in_opt HWND hWndParent,
__in_opt HMENU hMenu,
__in_opt HINSTANCE hInstance,
__in_opt LPVOID lpParam
);Code: Select all
Window XCreateWindow(
display,
parent,
x,
y,
width,
height,
border_width,
depth,
class,
visual,
valuemask,
attributes
);Code: Select all
Qt_CreateWindow()
{
#ifdef __MS_WINDOWS
CreateWindow();
#else
XCreateWindow();
#endif
}So you get about the same abstraction using C++ as you would with Java, minus the use of templates and pointers, but you can usually use smart pointers and additional library abstractions to emulate JVM garbage collection, etc. Templates and pointers though, are actually really powerful and the pre-processor is a fantastic tool once you understand it, I can't count how many times I would love to have had a pre-processor in PHP, even having tried get the M5 pre-processor to work with PHP.
Both are tools designed to address a similar problem, but in terms of applicability, Java has won the mobile race, C++ will continue to compete in most other markets.
Also it's important to note, that anything you can imagine, you can do in C++ but the same cannot be said of Java. I have yet to see (although that doesn't mean it couldn't done - but then Java would be emulating C++) device drivers, or system code written in anythign other than C/C++.
C++ comes with a higher learning curve, but is fully capable of doing everything Java is. Both have a tremendous amount of tools, due to their static nature, refactoring tools are far more common than PHP. Java *may* have an advantage over C++ in terms of a dynamic runtime nature, so like in PHP where you could use eval() and execute code on the fly in C/C++ this would probably require an additional library to essentially wrap the native pre-processor, compilation phases, which can be very slow and therefore not very practical. That being said, most people agree that using dynamic code in this fashion is a bad practice.
With enough imagination and experience so much is possible with C++. The Spirit parsing framework is an excellent example of incredible insight. When I discovered that framework I couldn't believe the ingenuity of the developer(s) what a cool idea and use of template programming.
Now for personal opinion, Java, has always struck me as a academia oriented language to teach good programming practices to newbies and not distract them with low-level gory details that C/C++ do. It does this really well, and over the years it's evolved into a serious enterprise application programming langauge/technology stack. However, the community is so focused on best practices, I think sometimes they have a tendancy to over abstract things and thus produce bloated software. The C/C++ community are both best practice oriented but at the same time remain passionate about producing optimized software.
EDIT | Apparently Swing produces/uses the native OS control stack. I assume the API conditionally checks to see whether to use the Windows API or X API, but that would be a lot of extra conditionals done at runtime. In C++ this conditional test is done at compile time, so while that means compiling once for each platform, it reduces runtime execution significantly.
Both are good tools, Java I have only an interest in, having never written a single line of code, but read hundreds of articles. C/C++ on the other hand, I have written hundreds of thousands of lines of code in, in fact I'll give myself a plug and redirect your attention to codeproject:
http://www.codeproject.com/script/Artic ... amid=26623
Feel free to rate, but if you do, you should give a 5 just cause. LOL I'm only teasing.
You have to ask yourself, where you see yourself in the future to determine which tool is better suited for this project. In terms of development time, a experienced C++ developer can write the same program as a Java developer in about the same time. Learning curve may be a factor in your deciding to go with Java. Your odds at landing a job as a Java developer are probably greater than C++ however if your interested in other areas of development, such as device drivers, system programming, etc, then C++ is hands down the winner.
I chose C++ because at the time, there was no Java, perhaps if Java were around I may have choosen it over C++.
In short, Java probably makes more sense professionally, as you can switch from desktop development to web application development using the same language, whereas you will likely never see web applications built in C++ except for highly optimized crons jobs, etc. On the flip side, if programming is your passion and you have many varied interests, C++ is probably a better investment in time.
Interesting discussion:
http://stackoverflow.com/questions/4178 ... plications
p.s-Visual Basic is a good tool, for hammering out quick and dirty applications or prototypes which are later replaced. VB is like Access, it lets you get the job done fast, but results in hard to maintain code with weird automagic.
Cheers,
Alex