Howdy folks
I've been wanting to get into C++ programming for a good while now, so much so that I was planning on majoring in Computer Science in college. Though after reading up on the programming language, following a few dozen tutorials and walk-throughs, and eventually just face-rolling my keyboard in shame, I've come to terms with the fact that I have absolutely no idea where to begin here.
I'm at a loss, though I followed one walkthrough to a T and managed to get the.. the "program".. if you can call it that, to go through debug mode without any [b][i]WARNING CATASTROPHIC MELTDOWN IMMINENT. YOU DONE FUCKED UP NOW[/i][/b] errors appearing, but then I was stuck at.. well "What now?"
I'd love to try to code for games, make mods, and all that wonderful stuff, but I'm blocked off at my own ignorance of the subject.
Can anyone get me any pointers on where to.. well, even begin here?
Take an intro level course at your College and see what happens.
[QUOTE=Commando123;39707460]Take an intro level course at your College and see what happens.[/QUOTE]
Haha. This guy.
Anyway, my best advice to you is to practice. Write a line of code or two, try to get it to run. If it doesn't run, then make it run.
And don't expect to learn everything quickly, don't expect to completely understand concepts you're using in your code. When I was first starting out there were many concepts, pieces of code, functions, and other things that I was using/calling that I didn't know WHY I was doing it but that I had to do it. Just teach yourself the process of what makes it work rather than why it works the way that it does, and you won't boggle your own mind and have a meltdown. In my own experience, it's easier to learn application and process of coding before you get into the theory and inner-workings behind it.
[QUOTE=Commando123;39707460]Take an intro level course at your College and see what happens.[/QUOTE]
This only works if you get a good professor at university.
If you get a bad professor, you will want to IMMEDIATELY change majors. I got the latter and I hated programming with a passion. The only reason I'm still doing it was because I forgot to look into changing majors so I just stuck with it. 3 years later and programming is bearable for me now and I can do some interesting stuff. I'm just now into the point where I can make games and whatever.
[editline]25th February 2013[/editline]
And I should note, starting with C# would be a great idea. It's a shit ton of fun to use and you'll rarely ever be bogged down by the syntax.
[editline]25th February 2013[/editline]
But its slow as shit
Do you have any prior experience with programming?
[QUOTE=Mr_Razzums;39708264]But its slow as shit[/QUOTE]
no it isn't
[QUOTE=Mr_Razzums;39708264]But its slow as shit[/QUOTE]
Your own code might be, but the language is not.
[QUOTE=gparent;39711243]Your own code might be, but the language is not.[/QUOTE]
Yes, the language is not, the VM is.
[QUOTE=SiPlus;39711564]Yes, the language is not, the VM is.[/QUOTE]
C# does not run on a VM. Code is generated for a (non-existing) VM as an abstraction layer for compatibility between other .NET languages which is then JIT compiled (ahead of time for mono) to machine code.
About a year ago I had the exact same experience as you have now. Once I managed to make the bloody thing run, as soon as I changed one line of code it would all explode. I finally decided to do it right, which you can only do by reading books really. Tutorials on YouTube are absolute shit, they do teach you stuff, but the learning curve is slow and it's not really that helpful. Trust me, I watched +30 videos on YouTube before reading one of O'Rileys amazing books
So where am I now? I'm currently programming a game in C# in a professional engine. Here's how you get there
First of all you chose the wrong language to start out with. C++ is, as far as most people concern, much harder than C#, although it's more widely used in the gaming industry. I can strongly suggest learning C# before C++, as you can always start learning it later on in life. I recently started reading a book on C++, and I can clearly tell how C# is just more user friendly. I could after reading the first line I ever learned in C++.
Now, what you want to do is go pick up a book called O'Rileys Head First: C#. He has a dozen of books regarding programing languages, and this one will do you just fine. It's around 800 pages so you got a lot of for you bucks. You can pick it up on Amazon [url=http://www.amazon.com/Head-First-C-Jennifer-Greene/dp/1449343503/ref=sr_1_fkmr0_3?ie=UTF8&qid=1361812107&sr=8-3-fkmr0&keywords=o%27riley+head+first+C%23]here[/url]
Now, what I did was I roughly read the first 200 pages of the book. That'll give you the knowledge of exactly how the syntax works. Then I moved on to Unity which supports C# script. It's not the exact same thing as coding in Visual Studio, but it's essentially the same thing with a custom library. You'll have to navigate Unity at this point, but don't worry, I have an actual good Tutorial video for that as well, which you can find [url=http://www.youtube.com/watch?v=kE8nZL5FdQc]here[/url]. Once you've watched that entire thing, you'll be set to use Unity on your own. He also teaches you some basic movement using C# Script, which is always a good thing :)
From there on you can just learn by yourself, imagine what kind of game you'll want to make and just start from one end. I can highly recommend some sort of space shooter, where you fly a ship that shoots at oncoming alien ships. That was my first project, and it was a load of fun. If you have a hard time with something, you can always refer to Unity's Script Reference website [url=http://docs.unity3d.com/Documentation/ScriptReference/]here[/url]. Simply Googling "Unity raycasts" will give you the exact links to raycasts from that website, do that instead of navigating it directly.
Once you get the hang of programming, I suggest you go back and read through the rest of the book, as you're missing out on some key parts.
Other than that I wish you good look. It's extremely challenging so you'll need motivation and help. You can contact me on Steam [url=http://steamcommunity.com/id/Lallumio]here[/url] or simply PM me on Facepunch as I check it several times a day.
Good luck :)
[QUOTE=SiPlus;39711564]Yes, the language is not, the VM is.[/QUOTE]
Do you ever get tired of lying to yourself constantly about things just so your ivory tower of C and C++ supremacy is maintained? There isn't even a real VM and you're finding performance problems with it! How much more blatantly incorrect about almost everything performance related do you need to be before a reality check kicks in and your brain decides to start learning a few facts about it?
You say you've been reading books and tutorials about C++, so why listen to those guy's above telling you to learn their preferred language, telling you it's better because of X. Just stick with what you've learned so far, changing language now will just confuse you more.
And one programming language isn't harder than the other, The logic behind it stays the same, syntax is different. It's just that beginners piss their pants when they hear pointers.
I'm gonna take a wild guess and say that you probable have the same problem as i had. You've leaned the (basic) programming language C++, you know what classes are, what OOP is, what pointers are and you understand the logic behind it all. What you have to do now is either download a Framework and learn to program for that.
Or you can start from scratch. Learn basic WIN32, you dont need to know what every parameter means, if you ever need it you can always look it up how to do it. Learn how make a window in windows, then learn how to add textboxes, vector graphics(Direct2D), use user input,... And you don't have to buy a fancy book for it, you can learn it right here on the microsoft website. And if there are unclear parts just google them. [url]http://msdn.microsoft.com/en-us/library/ff381399(v=vs.85).aspx[/url]
Best bet is to learn Direct2D, Remake a level from mario bros or something. You might need learn some physics and math to.
Hope this help you on the way to become a programmer
[QUOTE=Sergesosio;39715341]You say you've been reading books and tutorials about C++, so why listen to those guy's above telling you to learn their preferred language, telling you it's better because of X. Just stick with what you've learned so far, changing language now will just confuse you more.
And one programming language isn't harder than the other, The logic behind it stays the same, syntax is different. It's just that beginners piss their pants when they hear pointers.
I'm gonna take a wild guess and say that you probable have the same problem as i had. You've leaned the (basic) programming language C++, you know what classes are, what OOP is, what pointers are and you understand the logic behind it all. What you have to do now is either download a Framework and learn to program for that.
Or you can start from scratch. Learn basic WIN32, you dont need to know what every parameter means, if you ever need it you can always look it up how to do it. Learn how make a window in windows, then learn how to add textboxes, vector graphics(Direct2D), use user input,... And you don't have to buy a fancy book for it, you can learn it right here on the microsoft website. And if there are unclear parts just google them. [URL]http://msdn.microsoft.com/en-us/library/ff381399(v=vs.85).aspx[/URL]
Best bet is to learn Direct2D, Remake a level from mario bros or something. You might need learn some physics and math to.
Hope this help you on the way to become a programmer[/QUOTE]
This post helped me so much. I'm almost at the point where I understand the language. There's still a few things left to go, but I had no idea what to do afterwards.
Is there any particular framework you'd recommend?
[QUOTE=a wet towel;39716726]This post helped me so much. I'm almost at the point where I understand the language. There's still a few things left to go, but I had no idea what to do afterwards.
Is there any particular framework you'd recommend?[/QUOTE]
If you want to make something in 2d, I would recommend SFML myself. Its pretty damn easy to do anything in
[QUOTE=gparent;39712524]Do you ever get tired of lying to yourself constantly about things just so your ivory tower of C and C++ supremacy is maintained? There isn't even a real VM and you're finding performance problems with it! How much more blatantly incorrect about almost everything performance related do you need to be before a reality check kicks in and your brain decides to start learning a few facts about it?[/QUOTE]
Damn, that was brutal. *clap* *clap*
*munches popcorn*
[QUOTE=Persecution;39707444]Howdy folks
I've been wanting to get into C++ programming for a good while now, so much so that I was planning on majoring in Computer Science in college. Though after reading up on the programming language, following a few dozen tutorials and walk-throughs, and eventually just face-rolling my keyboard in shame, I've come to terms with the fact that I have absolutely no idea where to begin here.
I'm at a loss, though I followed one walkthrough to a T and managed to get the.. the "program".. if you can call it that, to go through debug mode without any [b][i]WARNING CATASTROPHIC MELTDOWN IMMINENT. YOU DONE FUCKED UP NOW[/i][/b] errors appearing, but then I was stuck at.. well "What now?"
I'd love to try to code for games, make mods, and all that wonderful stuff, but I'm blocked off at my own ignorance of the subject.
Can anyone get me any pointers on where to.. well, even begin here?[/QUOTE]
Feed yourself with C++ until it clicks.
That's the short version.
The main challenge is knowing if this is something for you. If you REALLY want to become a programmer you'd [B]try harder until it works.[/B]
programming in general is not easy to get adjusted to. It takes years to "get it" and create a flow. It's like any creative hobby out there. You have to adjust your brain to it, and the best way to do it is to do programming all the time and never stop. To constantly feed yourself with information.
Why sit there asking yourself "what now" when you could be reading articles about interesting programming subjects or reading/watching tutorials. Get to work chucklefuck.
[QUOTE=SiPlus;39711564]Yes, the language is not, the VM is.[/QUOTE]
Pretty sure C# virtual machine doesn't even exist.
- snip -
C#'s VM is very slow. So slow, in fact, that it doesn't actually ever do anything.
This is because it does not exist.
EDIT: *actually ignore me
[url]http://www.code.org/[/url]
is a great place to get into programming :)
A decent way to learn is to just pick something you think is interesting to make (not too complex mind you, don't want to overwhelm yourself) and just try and make it. You'll pick up a lot of what you need to know along the way, and what you don't know you can always look up! Figuring things out for yourself is so much better than just following tutorials and memorising things.
[QUOTE=MakeR;39711659]C# does not run on a VM. Code is generated for a (non-existing) VM as an abstraction layer for compatibility between other .NET languages which is then JIT compiled (ahead of time for mono) to machine code.[/QUOTE]
[QUOTE=gparent;39712524]Do you ever get tired of lying to yourself constantly about things just so your ivory tower of C and C++ supremacy is maintained? There isn't even a real VM and you're finding performance problems with it! How much more blatantly incorrect about almost everything performance related do you need to be before a reality check kicks in and your brain decides to start learning a few facts about it?[/QUOTE]
[QUOTE=W00tbeer1;39723120]Pretty sure C# virtual machine doesn't even exist.[/QUOTE]
I've said this in WAYWO already, and I hate to repeat myself, so you people better learn this time.
This is wrong, C# does run on a VM (the [URL="http://en.wikipedia.org/wiki/Common_Language_Runtime"]CLR[/URL]).
Just because it uses JIT compilation doesn't mean it's not a VM, in that case, HotSpot/LuaJIT/QEMU/VirtualBox/etc aren't VMs.
VMs don't have to use interpreters, how they execute the code is irrelevant, what does matter is the environment they provide.
I think you mean to say .NET applications run on a VM; C# doesn't dictate that. Nor does C# run on a VM. The virtual machine for Microsoft's C# is used to generate code for the CLR.
Here rather than arguing over how it works, why not check out the actual performance: [url]http://www.codeproject.com/Articles/212856/Head-to-head-benchmark-Csharp-vs-NET[/url]
See for yourself
Then, ask yourself "does what I'm doing a) actually need the extra performance and b) if it does depend on performance, actually make a difference if it's a little slower (E.G making a game you're not going to release) and c) is the extra gain worth my time spent making the equivalent code in C++ rather than C#?"
[editline]1st March 2013[/editline]
ps if you're learning go with C# at least to start with
I think C and C++ is for cool kids, and if you like to get stuff done, then you use C#.
[QUOTE=dajoh;39760762]I've said this in WAYWO already, and I hate to repeat myself, so you people better learn this time.
This is wrong, C# does run on a VM (the [URL="http://en.wikipedia.org/wiki/Common_Language_Runtime"]CLR[/URL]).
Just because it uses JIT compilation doesn't mean it's not a VM, in that case, HotSpot/LuaJIT/QEMU/VirtualBox/etc aren't VMs.
VMs don't have to use interpreters, how they execute the code is irrelevant, what does matter is the environment they provide.[/QUOTE]
In the context of this argument. C# doesn't use a VM.
Just like a dentist doesn't use powertools, even though the tools he uses fit the definition.
It's obvious by the first posts that the subject was the CLR.
[QUOTE=acpm;39761012]I think C and C++ is for cool kids, and if you like to get stuff done, then you use C#.[/QUOTE]
C is for everyone.
You guys are all wrong, Java is the industry standard and furthermore
Sorry, you need to Log In to post a reply to this thread.