C++ windows for beginners

Posted by: jmwking

C++ windows for beginners - 05/10/2017 23:28

My daughter is in her first programming class in HS. We're looking for a nice, beginner level site to help her get ahead in her class.

Right now, her goal is a "pause" command that doesn't error out...

Any ideas?

-jk
Posted by: JBjorgen

Re: C++ windows for beginners - 06/10/2017 02:54

while (1) {}

smile

Computer might get a little warm though.
Posted by: Shonky

Re: C++ windows for beginners - 06/10/2017 07:18

Really C++?

.NET I would have thought would be the way for PC type programming these days.

http://www.learncpp.com/ looks alright but there seems to be quite a few.
Posted by: Roger

Re: C++ windows for beginners - 06/10/2017 08:50

Windows: Sleep(INFINITE); -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686298.aspx
POSIX: sleep(UINT_MAX); -- https://linux.die.net/man/3/sleep -- it's not actually forever, but UINT_MAX seconds should be plenty.
Posted by: Roger

Re: C++ windows for beginners - 06/10/2017 08:52

Originally Posted By: Shonky
.NET I would have thought would be the way for PC type programming these days.


I'm recommending to my son that he learn Python and JavaScript (despite the fact that I hate both of them). .NET (i.e. C#, but look at F#) would be a good alternative. He wants to learn Erlang (like Daddy uses), but that's a bit niche. I suggested Elixir instead.
Posted by: larry818

Re: C++ windows for beginners - 06/10/2017 13:09

I didn't read this post as wanting help with pause specifically, but asking for a site to help generally. Something like...

https://javaranch.com/

...but for C.
Posted by: jmwking

Re: C++ windows for beginners - 06/10/2017 20:44

Originally Posted By: JBjorgen
while (1) {}

smile

Computer might get a little warm though.


If my quick googling is accurate: ouch!

-jk
Posted by: jmwking

Re: C++ windows for beginners - 06/10/2017 20:45

Originally Posted By: Shonky
Really C++?

.NET I would have thought would be the way for PC type programming these days.

http://www.learncpp.com/ looks alright but there seems to be quite a few.


Yeah, C++. thanks for the link!

-jk
Posted by: jmwking

Re: C++ windows for beginners - 06/10/2017 20:47

Originally Posted By: larry818
I didn't read this post as wanting help with pause specifically, but asking for a site to help generally. Something like...

https://javaranch.com/

...but for C.


Yeah, a little of both - a specific request for a pause command, but a more general C++ site for beginners so she can move on...

thanks, everyone!

-jk
Posted by: jmwking

Re: C++ windows for beginners - 06/10/2017 20:51

Originally Posted By: Roger
Windows: Sleep(INFINITE); -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686298.aspx
POSIX: sleep(UINT_MAX); -- https://linux.die.net/man/3/sleep -- it's not actually forever, but UINT_MAX seconds should be plenty.
Originally Posted By: Roger
Originally Posted By: Shonky
.NET I would have thought would be the way for PC type programming these days.


I'm recommending to my son that he learn Python and JavaScript (despite the fact that I hate both of them). .NET (i.e. C#, but look at F#) would be a good alternative. He wants to learn Erlang (like Daddy uses), but that's a bit niche. I suggested Elixir instead.


I figure any language she learns as a first will help moving forward. And HS has only the one language.

Once you learn to think programming, the rest is (mostly?) syntax...

-jk
Posted by: DWallach

Re: C++ windows for beginners - 06/10/2017 21:27

Originally Posted By: jmwking
My daughter is in her first programming class in HS. We're looking for a nice, beginner level site to help her get ahead in her class.

I'm a bit surprised that a high school is teaching C++. The current popular languages for beginners in universities seem to be Java and Python, with Python really becoming the go-to standard. There's just less of it you need to know to start being productive. JavaScript is growing in popularity because it's in every browser everywhere.

In all seriousness, the way to help a true beginner get ahead is to have them learn something other than C or C++. Those language have far too many pitfalls that make it hard to debug. (Example: malloc() returning non-zeroed memory, so you can end up following pointers to weird places and see garbage in your debugger.)

The various MOOCs out there seem to be a good structured way to get from nothing to something and they generally have you do all your coding within the browser.

If you want something slightly more cutting edge, you might have a look at Pyret, which you can think of as a LISP/Scheme-family language with a surface of Python syntax. Everything runs in browser, and they have curriculum materials targeting middle-school kids in math classes. Learn the Pythagorean Theorem while building shoot-em-up videogames!