09-20-2016, 10:56 PM | #1 |
FFR Veteran
Join Date: Jan 2007
Location: In your anus. Right corner
Age: 31
Posts: 1,002
|
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! |
09-20-2016, 11:08 PM | #2 |
~ お ま ん こ ~
|
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.
__________________
Last edited by DaBackpack; 09-20-2016 at 11:15 PM.. |
09-21-2016, 12:12 AM | #3 |
remederpin
Join Date: Feb 2007
Location: Ontario, Canada
Age: 31
Posts: 4,884
|
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. |
09-21-2016, 12:16 AM | #4 |
FFR Veteran
Join Date: Jan 2007
Location: In your anus. Right corner
Age: 31
Posts: 1,002
|
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.. |
09-21-2016, 06:52 AM | #5 | |
longing
Join Date: Dec 2007
Location: Ontario, Canada
Posts: 2,680
|
Re: Learning to code in C++
Quote:
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. |
|
09-21-2016, 08:38 AM | #6 | |
Batch Manager
Game Manager, Song Release Coordinator
Join Date: Mar 2008
Location: USA
Age: 29
Posts: 14,871
|
Re: Learning to code in C++
Quote:
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. |
|
09-5-2017, 03:41 AM | #7 |
FFR Player
Join Date: Jun 2017
Posts: 13
|
Re: Learning to code in C++
cprogramming.com to learn how to shit out some imperative code quickly
|
09-5-2017, 11:36 AM | #8 |
FFR Player
Join Date: Dec 2007
Location: nima
Posts: 4,278
|
Re: Learning to code in C++
news flash all code is imperative
|
09-5-2017, 02:12 PM | #9 | ||
Carry your failures proud
Join Date: Sep 2015
Age: 23
Posts: 644
|
Re: Learning to code in C++
__________________
Quote:
Quote:
|
||
09-6-2017, 11:56 PM | #10 |
FFR Player
Join Date: Jun 2017
Posts: 13
|
Re: Learning to code in C++
|
09-7-2017, 02:37 AM | #11 |
FFR Player
Join Date: Dec 2007
Location: nima
Posts: 4,278
|
Re: Learning to code in C++
|
09-7-2017, 02:39 AM | #12 |
FFR Player
Join Date: Dec 2007
Location: nima
Posts: 4,278
|
Re: Learning to code in C++
news flash i can both shitpost and out critically think retards at the same time
|
09-7-2017, 06:35 AM | #13 | |
Spun a twirly fruitcake,
Join Date: Feb 2009
Age: 31
Posts: 3,865
|
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:
|
|
09-8-2017, 05:33 AM | #14 |
Banned
Join Date: Sep 2005
Age: 35
Posts: 273
|
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.. |
07-14-2020, 05:25 AM | #15 |
FFR Player
Join Date: Jul 2020
Age: 30
Posts: 7
|
Re: Learning to code in C++
Thank you for sharing, I am also interested in this topic.
|
08-10-2020, 07:15 AM | #16 |
Dark Chancellor
|
Re: Learning to code in C++
c++ is horrible and is not a great reflection of the progress programming has gone through since 1985.
__________________
|
08-10-2020, 03:13 PM | #17 | |
~ お ま ん こ ~
|
Re: Learning to code in C++
Quote:
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)
__________________
Last edited by DaBackpack; 08-10-2020 at 03:16 PM.. |
|
08-10-2020, 07:00 PM | #18 |
Dark Chancellor
|
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.
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|