Projects for C++ Beginner/Intermediate? [closed] - c++

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I really want to learn more about C++. I know the basics, and I know the concepts, and I have even been able to create C++ projects myself, but my problem is being able to view, fix, and add to code I haven't written myself. I have looked at some open source projects on sourceforge, etc, but many of them are so big or there are soooo many projects available until I don't know what to do.
Are there any "small or simple" projects or tasks in C++ that will allow me to extend my knowledge of C++ by use of hands on experience?

If you are already able to create own projects, I think the best way to learn how to read&change someone's code is to get job in software company. They even will pay for it :)

Creating your own client / server application using socket programming is a big and fun area in programming which you should check out.
http://subjects.ee.unsw.edu.au/tele3118/wk6_sockets.pdf

...but my problem is being able to
view, fix, and add to code I haven't
written myself.
That is tough even for experienced programmers.
A book that might help you is Code Reading: The Open Source Perspective by Diomidis Spinellis.

Read The Art of Unix Programming ( TAOUP ). Its available online, well written and has lots of case studies that represent well designed programs. You may also find some good C++ opensource software amongst those case studies.
Apart from TAOUP, take a look at Boost C++ Libraries. They provide peer reviewed source libraries that are very well documented.
Another one, I have heard is Postfix ( an Open source email server for Unix ) that is said to have well written C++ code. Though, I must admit I do not have any direct experience with it.
Hope this helps :)

Related

How to use libraries in C++? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Hello I'm new to coding in C++, thankfully I'm quickly learning how to use it. So far I've heard of libraries and how they can be used in an application.
My questions is are:
What do I need to do after I download ANY library?
How do I #include "library.h" or #include <library> and use it
in a project without intellisense or the compiler going nuts?
What if the library is header only?
What should I look for?
Are there any apps I need?
What if there's no build folder?
Usually the instructions are unclear to me, maybe it's because I'm still green.
Please try to explain this in an easy to follow manner like if you were teaching it to someone that knows NOTHING: I've tried to follow other guides but with no luck.
Beforehand, thank you very much!
If it's header-only, including the header is enough. Otherwise, a library can be any piece of code in any form (source in various languages, binary, shared, static, ...). It's impossible to cover all the cases, each library is supposed to come with its own documentation.
Each and every library has a specific license (eg MIT, GPL, LGPL etc) for it's use. There can be differences between uses (eg personal, academic and commercial etc) but often not. It's quite easy to learn about the major licenses and how they might apply to your use case on the internet. But if you are doing this for commercial purposes or have any doubt whatsoever consult a lawyer.

Can OOP be used in Embedded C? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I'm very new to software development and really loving it.
Currently, my work involves C++ programming in an OOP implementation (basically, the guys who started the framework for the software used OOP approach in everything). I jumped in and inherited what's already there.
Hobby-wise, I would like to develop a framework also for an embedded application.
Basically programming Embedded C on a microcontroller.
Is it wise to do the framework in OOP approach also?
I was thinking it is more organized.
Thanks in advance for the answers!
I would say that it depends on your microcontroller specifications (and how many resources you have).
In my experience (as Olaf says it's a subjective opinion):
OOP approach is usually clearer, avoids some mistakes for common variables and allows other person to use the framework without a painful learning process.
However... it usually require more resources as you need to encapsulate everything and that leads into more functions.
So... it depends...
It depends on your Embedded applicaton.
In some scenarios some c++ features costlier.
for e.g. run time polymorphism. .
Hope this link helps.!
http://www.embedded.com/design/programming-languages-and-tools/4424383/A-guide-to-C--for-C-programmers

Communication method for data exchange between a server and several clients for 10+ years [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We're running an experiment which will involve collecting data from multiple stations around the world. Each station will be providing HDF5 files with magnetic field measurements in a rate of 1 kHz and some auxiliary data in real time. The latency is going to be a few minutes.
I'm assigned to design this program (in C++, with clients/server model, with server being in linux and clients being cross-platform), and apparently I'll be designing this from scratch. My first concern is not to really do everything from scratch because this will be more error prone and pure wrong, so my question here is: What information/file transfer protocols/libraries should I use so that
The program can live for 10+ years with minimal maintenance
I can have very good support from the community for when I need help.
Since we need something relatively secure, my first thought was libssh (the only cross platform opensource library available out there for ssh), but then after discussing with some pros there I realized that the support there isn't so wonderful because only a few people work with libssh. The pros there hesitated in suggesting OpenSSL, but with OpenSSL I'll have to write my own authentication (apparently, I'm not an expert and that's why I'm asking).
What would you suggest? Please share your vision to whether I should go for OpenSSL, libssh, or something else.
PS: Please, if you're going to start off by saying this question is off-topic, move on and ignore it. Consider being helpful rather than critical.
If you require any additional information, please ask.
I think that OpenSSL might be a good choice.
No you do not have to "write you own authentication" - you just need to generate certificates and keys and put them in the right places - that is all.
I would suggest to look at the examples in <openssl-source-dir>/demos and <openssl-source-dir>/apps to get you started. Reading a book about OpenSSL would also be a good idea - for many other reasons (sometimes not directly related with SSL/TLS).
I hope that helps.

Ideas for a C/C++ library [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I thought one of the best ways to familiarise myself with C/C++, is to make a helpful library. I was maybe thinking like a geometry library, like to calculate areas, surface area, etc. It would be useful in game programming. Or maybe an algebra library, like for different formulas like the distance formula, quadratic formula, etc. Or maybe like a standard library for very simple functions, like calculating the number of items in an array.
If it is for the sake of an exercise, writing a library to deal with fractions is a good one.
http://en.wikipedia.org/wiki/Fraction_(mathematics)
Implement the basic operations and a way to print them.
Find a problem that you need to solve. Look around to see if a library exists already. If not, then solve it in a way that others can benefit and put the library up on something like github.
But please be prepared to support it if you want to really see it being used - nothing worse than a open source project that isn't well supported.
I'd encourage you to try and come up with an application that would make use of the library. A game, a business app, whatever. Maybe even come up with an application idea first then determine what libraries you would need that aren't readily available.
That way you know you'll be creating something of practical value and not just undertaking a purely intellectual exercise. Try and avoid just plucking a library idea out of the air as you'll inevitably reimplement something that already exists. That's fine for you to learn but it would be awesome if you could create something others could benefit from in the process :)
Also, your application will provide a ready made test for your library.
Much of what you're listing has been done and can be found in Boost and or GSL. If learning is your goal, how about write a Qt application that uses some of these math functions?
Creating 'toy' level libraries doesn't help much on learning C++. I'd suggest you look at the libstdc++ bugs, try to understand and help fixing some ones.

What are some small, fast and lightweight open source applications (µTorrent -esque)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Possible duplicate
What is the best open source example of a lightweight
Windows Application?
µTorrent is a small bit-torrent client, a really small one. It doesn't come with an installer, just a exe, you drop in your PATH somewhere. It's super lightweight and yet feature rich. Plus it is the work of one man. It's also closed-source.
Many people have been curious about how it has been written, and there are hints here and there about a custom library etc. But the question is, are there any programs with attributes like µTorrent that are available with source code--attributes like speed, small size, awesomeness.
Possible related question (/questions/9603/what-is-some-great-source-code-to-read), but think smaller than something like the Linux kernel.
Clarification: I don't want examples of bit-torrent source code, but anything which is used by tons of people (validation of awesomeness) and also fast, small and awesome!
I think you should take a look at Notepad++ if you want to see a feature-rich low-consumption of power software :)
Netcat
It's the program that started all of the curiousity behind networks and how things WORK.
Everyone's looked at this source code.
rTorrent is a lightweight, feature-rich, console-only open-source torrent client.
I like Frhed, a simple open-source Windows hex editor.
FRESHMEAT is a great place to start. There are lots of small open source programs available that you can study.
Examples:
XML-RPC specification.C implementation for Python. Its easy to learn and its fun.
Heapq [\Lib\heapq.py] , xml-rpc [\Lib\xmlrpc] and lots of other codes in Python library are very well written.