Valhalla Legends Forums Archive | C/C++ Programming | Should a n00b use C++ to learn programming?

AuthorMessageTime
j0k3r
I think Moonshine hit it. I also think that this was a very basic programming problem and that you should probably learn an easier language to get to know the basics of how a program is run before getting into/using C++.

[edit]Not very scientific is t? :P[/edit]
April 23, 2004, 12:06 AM
iago
[quote author=j0k3r link=board=30;threadid=6430;start=0#msg56373 date=1082678779]
I think Moonshine hit it. I also think that this was a very basic programming problem and that you should probably learn an easier language to get to know the basics of how a program is run before getting into/using C++.

[edit]Not very scientific is t? :P[/edit]
[/quote]

In my opinion, C is the best language to learn in. You should learn to do things right before getting lazy.
April 23, 2004, 12:34 AM
Mitosis
[quote author=j0k3r link=board=30;threadid=6430;start=0#msg56373 date=1082678779]

[edit]Not very scientific is t? :P[/edit]
[/quote]

First off, I just started it so its I havent even touched that part yet. Second of all, I have spent too much time on C++ and Im not going to give up now, even when it feals like Ill never understand something. Like just yesterday, iago and I were talking and I learned what a float was. (Go ahead and laugh but I never got to that part yet :\) So yeah Im learning something everyday like he says :) So Im not going to switch to another langauge. I've done that too many times. I started with C++ then moved to VB. Then back and forth, even went to Java. But I know what Im going to do now, which is C++. Since I got a taste of multiple languages I prefer C++.
April 23, 2004, 12:49 AM
j0k3r
If you don't know how to take in input, I don't think you know enough to truly decide what you like. I have gone around to a lot of languages and learned the basics, never sticking with one because I keep thinking one is more useful than the other, but it has taught me the basics very well. In-school programming is the best way to learn to program IMO, it's where I picked up the language the fastest, learned new concepts the fastest, and got feedback on what I was doing.

If you're too young to take programming languages in school, I commend you, but trying to learn a language such as C without any knowledge of actual programming is going to be alot harder than it should. Learning a basic language and understanding it then migrating to a new language (even going from that language to C) will give you a much better understanding, and make it alot more enjoyable.

I'm just speaking from my experience. That last comment was just a joke. I won't laugh at you for not knowing what a float is, I'm sure over 99% of the world doesn't know what a float is.

Note: It seems stupid I said you should learn a basic language first, because I always thought that was a stupid idea, but it does help, alot.

[edit]Also, you wouldn't be giving up anything, what you have learned so far is knowledge that has to do with programming, it's not restricted to C++. An integer is an integer in any language, outputting a message is the same in any language, it's just a matter of different keywords.[/edit]
April 23, 2004, 1:05 AM
Mitosis
Another thing Joker, I have been reading my book and some tutorials. So when I do code I dont know the best way to do it. I havent made very many programs. My experience in writing a program is limited, however reading is what I have been doing. So the more I practice, Ill learn more. I see what I did wrong and now I know for next time. I also have a better understanding on how to use that input.
April 23, 2004, 1:25 AM
Myndfyr
I think the question at hand is really, what do you want to do with it?

I have the basics of C/C++ down fairly well, and can generate console programs well enough. But when it comes into using libraries and headers and all that junk, I run into problems. My own headers are fine -- but some macros are just so complicated. And the whole Windows macro

BEGIN_MESSAGE_MAP

just blows my mind. I don't understand some of these things.

Oh well. Sooner or later I'll learn it. I'm not trying particularly hard right now.
April 24, 2004, 9:01 PM
Adron
IIRC, the begin message map macro and its companions declare an array of structs. Each struct in the array has a window message and a callback function to be called for that message.
April 24, 2004, 10:11 PM
Myndfyr
[quote author=Adron link=board=30;threadid=6449;start=0#msg56666 date=1082844670]
IIRC, the begin message map macro and its companions declare an array of structs. Each struct in the array has a window message and a callback function to be called for that message.
[/quote]

Meh, you're probably right - in fact, I think you are. The idea is just somewhat daunting, though, because you have these pre-built macros that come in the library, that I have no idea what they do, or more importantly, why they do it.

My meaning, though, is the things that look nothing like the language that are so central to the Windows programming environment. It's intimidating.
April 25, 2004, 12:37 AM
Adron
[quote author=Myndfyre link=board=30;threadid=6449;start=0#msg56698 date=1082853478]
Meh, you're probably right - in fact, I think you are. The idea is just somewhat daunting, though, because you have these pre-built macros that come in the library, that I have no idea what they do, or more importantly, why they do it.

My meaning, though, is the things that look nothing like the language that are so central to the Windows programming environment. It's intimidating.
[/quote]

They are central to using MFC.

I think it's what some people call "syntactic sugar" - doesn't really add anything, just makes it look different. Might be a bit faster to type when you're used to it, but makes the whole thing much more complex.

You don't have to use those to program in Windows though. Programming without MFC will allow you to build faster and smaller programs. You can't use all the sugar though, the "doubleclick here to declare a function that will be called when you click the button".

For that to work, the development environment must be able to add message handlers, and they have to look a very specific way that is easy for the text processing code to recognize.
April 25, 2004, 2:06 AM
Yoni
Message crackers >>>> Message maps.

#include <windowsx.h>

MFC sux.
April 25, 2004, 11:29 AM

Search