Old 09-20-2016, 10:56 PM   #1
Artic_counter
FFR Veteran
FFR Veteran
 
Artic_counter's Avatar
 
Join Date: Jan 2007
Location: In your anus. Right corner
Age: 30
Posts: 1,002
Default Learning to code in C++

I'm curently in a position in which I need to learn how to code in C++ and was wondering if I could get some advice on how to start from you FFR coding experts.

My background is engineering physics and so far, I've pretty much been able to make do with Matlab for whatever type of tech project/simulation/math analysis that was thrown at me. However, I've been assigned a project in which I need to interface instruments using C++ for various reasons. One being the fact that I'm dealing with a necessity for low response time. The other one being that everything else associated to those instruments are coded in C or C++ for compatibility. I don't expect being able to acquire some l33t skills in a week, but I don't exactly have 5 years to slowly and carefully build an absolute foundation of knowledge.

Do you know any material (Books/tutorials/etc) that could help me get functionnal in this language relatively quickly without having to plough through 800 pages long textbooks?

Much appreciated!
__________________


Artic_counter is offline   Reply With Quote
Old 09-20-2016, 11:08 PM   #2
DaBackpack
~ お ま ん こ ~
 
DaBackpack's Avatar
 
Join Date: Mar 2014
Location: unlikely
Age: 30
Posts: 915
Send a message via Skype™ to DaBackpack
Default Re: Learning to code in C++

That depends on how you learn, really. Some people can learn well from books, others tutorials.

Regarding books, this is a pretty good reference:

http://stackoverflow.com/questions/3...guide-and-list

You'll probably benefit from "Programming: Principles and Practice Using C++" which is a common recommendation for new programmers.

Yes, this is a long-ish book, but you don't need everything to get on your feet. If you already know Matlab, you probably don't need to relearn what a function is, but you SHOULD learn about how programs are made --- namely compilation and linking, and you should get a feel for Object Oriented Programming and the way data is stored on the machine.

In this book, you'll probably want to get started with "Part I: The Basics", and I would also recommend Chapter 17 if you have time. The rest you can look at if you're interested or if you encounter specific challenges with your projects.

This isn't exactly the quickest solution, but it's a trusted and established one.

EDIT: I can't speak for what the optimal online tutorials are, but maybe:

http://www.cplusplus.com/doc/tutorial/

I've used the site for language references, but glossing over the tutorial it looks pretty good too. You might want to use this to get a quick start, and then refer to the book or other online sources if you have specific questions.
__________________


Quote:
Originally Posted by Moogy View Post
no one cares
Quote:
Originally Posted by TWG Dan Hedgehog View Post
there are 743 matches for hedgehog suicide on deviantart
that's kind of a sad statistic

Last edited by DaBackpack; 09-20-2016 at 11:15 PM..
DaBackpack is offline   Reply With Quote
Old 09-21-2016, 12:12 AM   #3
remedy1502
remederpin
FFR Veteran
 
remedy1502's Avatar
 
Join Date: Feb 2007
Location: Ontario, Canada
Age: 31
Posts: 4,884
Default Re: Learning to code in C++

This is a great book if you wanna learn C++

http://majokota.weebly.com/uploads/6...nal__2013_.pdf

Not necessarily a beginner book but if you have programming experience you may be able to work through it. I promise you'll learn a bunch.
remedy1502 is offline   Reply With Quote
Old 09-21-2016, 12:16 AM   #4
Artic_counter
FFR Veteran
FFR Veteran
 
Artic_counter's Avatar
 
Join Date: Jan 2007
Location: In your anus. Right corner
Age: 30
Posts: 1,002
Default Re: Learning to code in C++

@DaBackpack

Thank you! Your recommended chapters are really appreciated. They seem straightfoward and can provide a solid reference later on.

Personnaly, I'm the type used to learning using a mixture of both. At the beginning, while learning Matlab, I was using tutorials first and later books to complement after an encounter with a problem I couldn't solve while using my brain+knowledge.
__________________



Last edited by Artic_counter; 09-21-2016 at 12:16 AM..
Artic_counter is offline   Reply With Quote
Old 09-21-2016, 06:52 AM   #5
Dinglesberry
longing
FFR Veteran
 
Dinglesberry's Avatar
 
Join Date: Dec 2007
Location: Ontario, Canada
Posts: 2,680
Default Re: Learning to code in C++

Quote:
Do you know any material (Books/tutorials/etc) that could help me get functionnal in this language
I don't know how well you'd get functional, maybe there are some books around for getting object oriented? ;D

To me though, C++ really isn't any different than most object oriented languages.. obviously syntax is different, but syntax is syntax you know, just a matter of getting it down/checking the reference as you write..

Are you literally trying to learn functional c++ programming? I read you do physics, so it could be possible.. C++ is a great language though, it has all the nice object oriented features of other languages with cool stuff like pointers, memory manipulation and allocation etc.

"interface instruments" sounds to me like there may already be a library made? The literal definition of interface is two systems that interact.. Most of the time, someone has already created a "controller" of sorts (e.g. you are using OpenGL, but you aren't manually creating it, you are importing GL and GLUT etc to C and doing things like glDeclareFunction() etc).. I'm even trying to figure out how you'd interface between them.. I mean, if they are written in C++/C, did you know that C/C++ code can run natively in tons of languages, such as Java? Python for example is interpreted to C code..

Do you specifically need to use C++? Most of the physics/math programmers I know are focused on things like matlab and python, but if you actually need to be functional..

I have some old assignments from one of my courses where we used C++ (it wasn't specifically C++, it was Systems Design, but it was my first time using C++ either way), if you want, pm me, I can send you some examples and such.
Dinglesberry is offline   Reply With Quote
Old 09-21-2016, 08:38 AM   #6
DossarLX ODI
Batch Manager
Game Manager, Song Release Coordinator
Game ManagerSimfile JudgeFFR Simfile AuthorD7 Elite KeysmasherFFR Veteran
 
DossarLX ODI's Avatar
 
Join Date: Mar 2008
Location: USA
Age: 29
Posts: 14,855
Default Re: Learning to code in C++

Quote:
Originally Posted by Dinglesberry View Post
Do you specifically need to use C++? Most of the physics/math programmers I know are focused on things like matlab and python, but if you actually need to be functional..
He needs to use C and/or C++ for compatibility and requires low response time according to the first post. C is a very fast language.

Ultimately it depends on what the application will be used for. C++ allows for object oriented design, and in that model of thinking your application will be based on what classes to make as well as any interfaces to implement (essentially, modeling the world with objects). In C you don't have that type of flexibility although you are able to define your own data types with typedef and use structs.
__________________
Quote:
Originally Posted by hi19hi19 View Post
oh boy, it's STIFF, I'll stretch before I sit down at the computer so not I'm not as STIFF next time I step a file
DossarLX ODI is offline   Reply With Quote
Old 09-5-2017, 03:41 AM   #7
valentineSM
FFR Player
 
valentineSM's Avatar
 
Join Date: Jun 2017
Posts: 13
Default Re: Learning to code in C++

cprogramming.com to learn how to shit out some imperative code quickly
valentineSM is offline   Reply With Quote
Old 09-5-2017, 11:36 AM   #8
MinaciousGrace
FFR Player
D7 Elite Keysmasher
 
MinaciousGrace's Avatar
 
Join Date: Dec 2007
Location: nima
Posts: 4,278
Default Re: Learning to code in C++

news flash all code is imperative
MinaciousGrace is offline   Reply With Quote
Old 09-5-2017, 02:12 PM   #9
Soundwave-
Carry your failures proud
FFR Veteran
 
Soundwave-'s Avatar
 
Join Date: Sep 2015
Age: 23
Posts: 644
Default Re: Learning to code in C++

Quote:
Originally Posted by MinaciousGrace View Post
news flash all code is imperative
Thank you.
__________________
Quote:
Originally Posted by [11:38 PM] Hakulyte
only person who can legit tilt me is like YoshL
Quote:
Originally Posted by スンファンさん
右に3回回らない限り間違います。
Soundwave- is offline   Reply With Quote
Old 09-6-2017, 11:56 PM   #10
valentineSM
FFR Player
 
valentineSM's Avatar
 
Join Date: Jun 2017
Posts: 13
Default Re: Learning to code in C++

Quote:
Originally Posted by MinaciousGrace View Post
news flash all code is imperative

yeah no shit *****. imperative/procedural is the term used to describe a linear instruction programming paradigm without use of functional or object oriented programming
valentineSM is offline   Reply With Quote
Old 09-7-2017, 02:37 AM   #11
MinaciousGrace
FFR Player
D7 Elite Keysmasher
 
MinaciousGrace's Avatar
 
Join Date: Dec 2007
Location: nima
Posts: 4,278
Default Re: Learning to code in C++

MinaciousGrace is offline   Reply With Quote
Old 09-7-2017, 02:39 AM   #12
MinaciousGrace
FFR Player
D7 Elite Keysmasher
 
MinaciousGrace's Avatar
 
Join Date: Dec 2007
Location: nima
Posts: 4,278
Default Re: Learning to code in C++

news flash i can both shitpost and out critically think retards at the same time
MinaciousGrace is offline   Reply With Quote
Old 09-7-2017, 06:35 AM   #13
SKG_Scintill
Spun a twirly fruitcake,
FFR Simfile AuthorFFR Veteran
 
SKG_Scintill's Avatar
 
Join Date: Feb 2009
Age: 31
Posts: 3,865
Default Re: Learning to code in C++

if you want to narrow it down to just the things you need for your project, just google your questions
__________________





Quote:
Originally Posted by bluguerilla
So Sexy Robotnik (SKG_Scintill) {.0001/10} [--]
___
. RHYTHMS PR LAYERING
. ZOMG I HAD TO QUIT OUT TERRIBLE
.
SKG_Scintill is offline   Reply With Quote
Old 09-8-2017, 05:33 AM   #14
businessman07
Banned
 
businessman07's Avatar
 
Join Date: Sep 2005
Age: 35
Posts: 273
Default Re: Learning to code in C++

What you need is a differentially encoding algo which will dictate your if loop while "else if"ing the computational code while checking and building the bullshit which is the language of C.

Did I mention fuck C?
-Bman07

Last edited by businessman07; 09-8-2017 at 05:34 AM..
businessman07 is offline   Reply With Quote
Old 07-14-2020, 05:25 AM   #15
YoungJulian34
FFR Player
 
YoungJulian34's Avatar
 
Join Date: Jul 2020
Age: 30
Posts: 7
Default Re: Learning to code in C++

Thank you for sharing, I am also interested in this topic.
YoungJulian34 is offline   Reply With Quote
Old 08-10-2020, 07:15 AM   #16
kommisar
Dark Chancellor
Retired StaffFFR Simfile AuthorFFR Music Producer
 
kommisar's Avatar
 
Join Date: Jun 2005
Location: Moncton, NB
Age: 33
Posts: 7,300
Send a message via AIM to kommisar Send a message via MSN to kommisar
Default Re: Learning to code in C++

c++ is horrible and is not a great reflection of the progress programming has gone through since 1985.
__________________
kommisar is offline   Reply With Quote
Old 08-10-2020, 03:13 PM   #17
DaBackpack
~ お ま ん こ ~
 
DaBackpack's Avatar
 
Join Date: Mar 2014
Location: unlikely
Age: 30
Posts: 915
Send a message via Skype™ to DaBackpack
Default Re: Learning to code in C++

Quote:
Originally Posted by kommisar View Post
c++ is horrible and is not a great reflection of the progress programming has gone through since 1985.
C++ is still the king for graphics manipulation and GPU programming, along with C. (unfortunately)

Quote:
Originally Posted by MinaciousGrace View Post
news flash all code is imperative
You must be fun at parties.

EDIT: This statement isn't even "literally" true if you use the definition used in your screenshot lmao. (assuming the second definition)
__________________


Quote:
Originally Posted by Moogy View Post
no one cares
Quote:
Originally Posted by TWG Dan Hedgehog View Post
there are 743 matches for hedgehog suicide on deviantart
that's kind of a sad statistic

Last edited by DaBackpack; 08-10-2020 at 03:16 PM..
DaBackpack is offline   Reply With Quote
Old 08-10-2020, 07:00 PM   #18
kommisar
Dark Chancellor
Retired StaffFFR Simfile AuthorFFR Music Producer
 
kommisar's Avatar
 
Join Date: Jun 2005
Location: Moncton, NB
Age: 33
Posts: 7,300
Send a message via AIM to kommisar Send a message via MSN to kommisar
Default Re: Learning to code in C++

Won't deny its efficiency for optimizing performance in any system, especially C since it's being hella used lately with embedded systems/ IOT

I still hate it. Computers are becoming pretty good at optimizing thread usage so even if there's more clunk on top of a language such as C#, the benefits it gives to a programmer makes up for it.
__________________
kommisar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution