Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,144 members, 7,818,433 topics. Date: Sunday, 05 May 2024 at 03:40 PM

C++ Helpline - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / C++ Helpline (3041 Views)

(2) (3) (4)

(1) (Reply) (Go Down)

C++ Helpline by BlueMagnificent(m): 1:30am On Jul 20, 2014
Realizing the lack of a C++ thread for those willing to learn C++ or those caught up in one or two programming hell in C++, I decided to create this thread as a Helper Thread. It is to assist newbies in the learning process of C++ , providing them with suggestions and advices and most importantly answering their questions, and also helping out those already into C++ who might have forgotten one thing or the other. I won't be doing this alone, I need the help of everyone of you that have a bit of knowledge in it.

WHAT THIS THREAD IS NOT ABOUT
This thread is not a Step by Step tutorial thread on C++. For you to benefit from this thread you must have started the learning process of the language with some materials, be it hardcopy textbooks, ebooks or online sites. A good online tutorial for C++ is http://www.cplusplus.com/doc/tutorial/

This thread is not an assignment solving machine in which you put in your assignment at one end and its solution comes out at the other end. If you must bring an issue concerning your assignment, let it be that you have done your own part of it but have one or two lingering problems. We can help you in your assignment so that you will be able to get it solved but we will not do it for you.

This thread is not about how to use library X or how to install library Y or how to configure GUI toolkit Z. Not that someone won't be able to attend to you, but that not everybody might be using the library you use so answers to library specific questions might delay (if they come at all). It's better to avoid such questions all together instead of giving yourself high hopes, you can still ask them if you're feeling lucky. A bit of an exception to the above is if the issue is bordering on language usage of the components provided by the Libraries, most especially issues of Objects and Classes(NOTE: Questions about the various compilers are welcomed).

This thread is not a showroom for how SUPER AWESOME you are in C++. Please do not intimidate others with your "magnificent knowledge and experience" in C++. If you have nothing meaningful to contribute then not typing at all is meaningful enough wink.

This Thread is a C++ Thread, not for C++ look-alike or C++ Younger Brother. They may have the same syntax and all but this place belongs to C++. The Only exception is C Programming Language.

2 Likes

Re: C++ Helpline by losprince(m): 4:02pm On Jul 21, 2014
why are the nairaland c++ers ignoring this thread pls ladies and gents lets not be stingy grin share your tips like chin chin. cool
Re: C++ Helpline by losprince(m): 4:14pm On Jul 21, 2014
here is my tip:

I open my c++ e book a chapter a day then I write codes till I grasp the chapter.

I don't copy and past source code angry

I tweak and re tweak codes till my compiler speaks pigin

try all practice problems

I'm always thinking of programming: " the codes I've written" "the codes I will right next?"

1 Like

Re: C++ Helpline by ALOBAM: 10:43am On Jul 22, 2014
#include <iostream>
using name space std ;
cheesy
Re: C++ Helpline by samlexxy: 3:11am On Jul 23, 2014
Copy that...
Re: C++ Helpline by aphildam(m): 4:57am On Jul 23, 2014
ALOBAM: #include <iostream>
using name(whitespace) space std ;
cheesy
Re: C++ Helpline by promise46(m): 1:52pm On Jul 26, 2014
Hello Nairalanders I got a laptop and am a newbie want to learn the c++ .how do I start,what are the basic perquisite
Re: C++ Helpline by BlueMagnificent(m): 1:50am On Jul 27, 2014
promise46: Hello Nairalanders I got a laptop and am a newbie want to learn the c++ .how do I start,what are the basic perquisite

First of all get a c++ compiler and probably an IDE as well. For free IDE and compilers: there is codeblocks [url]codeblocks.org[/url] which is an IDE and here is a download link for it bundled together with the MinGW compiler for C++ http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12mingw-setup.exe/download. There is also Visual C++ Express Edition which comes with the Visual C++ compiler and here is the link http://www.visualstudio.com/downloads/download-visual-studio-vs.

Now that you have gotten and installed the compilers, get a good book on c++, hardcopy or ebook. Here are two download links to free C++ ebooks http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html, http://it-ebooks.info/book/1256/

With all these done, you are set to learn
Re: C++ Helpline by ijeezlux(m): 1:17pm On Jul 29, 2014
Helo @blue magnificient, tanks for creating this thrend, i av bin following al ur programin post on nairaland, u ar rly doin a great job. Mor greaze to ur elbow. Am learnin c++, i av downloaded most of d c++ ebooks, i even bought a hardcopy textbook nd i must tel u dat it has bein an interesting experience. The only prob am avin is dat i am learnin it on my own so sumtyms i fil am not getin any challenge, and it takes me time to digest sum complex topic. Plz if u dnt mind giv me ur numb so dat i can be seeking ur help wen i nid 1. Tanks
Re: C++ Helpline by BlueMagnificent(m): 2:06pm On Jul 29, 2014
@Ijeezlux, there is always that feeling of not getting enough challange when you learn something on your own, smiley, that is actually normal. Still continue with the learning and gain the fundamentals first then you can face the challanges out there.
Or you can couple your solo C++ learning with challanges by picking up an open source project, going through its codes and seeing if there are some modifications or additions you can make. [url]sourceforge.net[/url] is a good place to find such projects.

If you have a problem its best you bring it here so that the solution you get will be available for someone else with the same issue smiley
Re: C++ Helpline by Nobody: 4:02pm On Jul 30, 2014
BlueMagnificient i got a request to do some C and C++ assignment and it was funny how i solved most basic question even using Arrays and Pointers somehow i can feel my interest in C++ coming back however i wanted to know more about Application of C++ in Nigerian Environment, however am working towards getting updated to C++11 as it seems easier for me now since when i tried it this time it was more easier to grasp than before.
Re: C++ Helpline by BlueMagnificent(m): 8:08pm On Jul 30, 2014
pcguru1: BlueMagnificient i got a request to do some C and C++ assignment and it was funny how i solved most basic question even using Arrays and Pointers somehow i can feel my interest in C++ coming back however i wanted to know more about Application of C++ in Nigerian Environment, however am working towards getting updated to C++11 as it seems easier for me now since when i tried it this time it was more easier to grasp than before.

C++11 is really an awesome piece of improvement to C++ making programming with it more easy and fun. Unfortunately in the Nigerian Environment I kind of feel C++ is underated due to the false information of it being hard, as a result of that people here tend to stick to web application programming or C++ wannabe Languages smiley
Re: C++ Helpline by asalimpo(m): 11:57pm On Aug 02, 2014
Hello Op , since ur versed in c++ cud u investigate this problem for me?

I dloaded a copy od devc++, and compiled and ran som simple programs ( they printed a string using cout).
Next, i fished around my ebook collection for a beginner book on c++. Found 1 . Typed a basic example . It compiled but didnt run as expected. The program just exited prematurely.
It was a very simple program. Basically,it did this:
print a string out to console (a question)
read user input from console (using cin) into a string
process the user input stored in d string
print result of step 3 to user.
Pause program using getchar()

Issue:
program exits at step 2, reading data console input,using cin.
Step 3 never was reached.

My os is win7.
I'v been put off c++ in d past because of this kinda bhvrs frm available compilers.
Re: C++ Helpline by BlueMagnificent(m): 1:33am On Aug 03, 2014
asalimpo: Hello Op , since ur versed in c++ cud u investigate this problem for me?

I dloaded a copy od devc++, and compiled and ran som simple programs ( they printed a string using cout).
Next, i fished around my ebook collection for a beginner book on c++. Found 1 . Typed a basic example . It compiled but didnt run as expected. The program just exited prematurely.
It was a very simple program. Basically,it did this:
print a string out to console (a question)
read user input from console (using cin) into a string
process the user input stored in d string
print result of step 3 to user.
Pause program using getchar()

Issue:
program exits at step 2, reading data console input,using cin.
Step 3 never was reached.

My os is win7.
I'v been put off c++ in d past because of this kinda bhvrs frm available compilers.

grin its unfortunate that some C++ issues can be so annoying.

I tried to reproduce this error you mentioned of but didn't succeed undecided. Below is the code I used


#include <iostream>
#include <string> //needed by VC++ but including by default in GCC
using namespace std;

int main()
{
string myName = "";
cout << "Enter your name?" << endl;
cin >> myName;
cout <<"Your name is " <<myName <<" with a character length of " <<myName.length() <<endl;
return 0;
}



The code was tested on Visual C++ 2010 (Express) and on two versions of MinGW ( GCC 4.7.2 and 4.9.1) and they both compiled and ran the code without undefined behavior. Did your program exit or it crashed, was there any return code other than zero on program exit. Can you paste your code here so I may understand better what you mean, but from my observation, I believe the problem might be from your development kit.

First of all the devC++ you are using is probably the outdated one which comes with a rather old version of MinGW. Why not try out another IDE with a relatively new version of MinGW, something like codeblocks [url]codeblocks.org[/url], but if you still insist on staying with DevC++ then get the Orwell version which is an active project http://orwelldevcpp..com/
Re: C++ Helpline by asalimpo(m): 1:07pm On Aug 03, 2014
Solved d problem l8r.
The program exited quickly instead of pausg after the
cin>>
so i added anoda pause statement.
 getchar() 
making it two.
The textbook code was wrong by d way.
I've dloaded code block,mingw,gcc, borland compiler before, but there was a particular piece of code i compiled with them dat got differg results (1 compiled,the others spat errors) . It was a textbook code, the inconsistency made me exit c++ learng.
Devc++ is also notoriously crash-prone , think it has to do with d nullsoft installer . I'll try and download vc++. I think its d best.

I'll b postg my problems here as i venture into this wrld.
Are u also into c?
Re: C++ Helpline by BlueMagnificent(m): 2:58pm On Aug 03, 2014
asalimpo: Solved d problem l8r.
The program exited quickly instead of pausg after the
cin>>
so i added anoda pause statement.
 getchar() 
making it two.
The textbook code was wrong by d way.
I've dloaded code block,mingw,gcc, borland compiler before, but there was a particular piece of code i compiled with them dat got differg results (1 compiled,the others spat errors) . It was a textbook code, the inconsistency made me exit c++ learng.
Devc++ is also notoriously crash-prone , think it has to do with d nullsoft installer . I'll try and download vc++. I think its d best.

I'll b postg my problems here as i venture into this wrld.
Are u also into c?

Good to learn you got the problem solved.
I actually came to C++ from C. Though I sparingly use C these days I can still help out in one or two ways smiley.
Re: C++ Helpline by peterincredible: 8:51am On Nov 09, 2014
pls mr bluemagnificient i am learning c++ and i have been learning it for almost a year now i am at polymorphism presently because i am learning it slowly and couple with d fact of dat i am a year 2 student at uniport i want to know when i finish learning it like for how many months will use to learn an API and for how many years can i practice on c++ before i start learning another language and pls i need your phone no so dat i can contact you directly for more advice pls send it to my email address ekene.dibie@gmail.com
Re: C++ Helpline by peterincredible: 8:52am On Nov 09, 2014
peterincredible:
pls mr bluemagnificient i am learning c++ and i have been learning it for almost a year now i am at polymorphism presently because i am learning it slowly and couple with d fact of dat i am a year 2 student at uniport i want to know when i finish learning it like for how many months will use to learn an API and for how many years can i practice on c++ before i start learning another language and pls i need your phone no so dat i can contact you directly for more advice pls send it to my email address ekene.dibie@gmail.com
and pls how many languages can you programme with
Re: C++ Helpline by BlueMagnificent(m): 9:34am On Nov 09, 2014
peterincredible:

and pls how many languages can you programme with

The number of languages I can program with is really not that import, what is important is how good you know the concept of programming: variables, control structure, functions and procedures, user defined types and others. Believe me if you have a decent knowledge of these you can learn another language in weeks smiley.
To still answer your question, I know quite a handful of them grin.
Re: C++ Helpline by peterincredible: 10:50am On Nov 09, 2014
BlueMagnificent:


The number of languages I can program with is really not that import, what is important is how good you know the concept of programming: variables, control structure, functions and procedures, user defined types and others. Believe me if you have a decent knowledge of these you can learn another language in weeks smiley.
To still answer your question, I know quite a handful of them grin.
sorry for asking 2 much questions sha but i want to ask how many month did it take you to learn c ++ and after learning it how will i start using and adding graphics i am asking this because i am teaching my self c++ pls answer because i want to be a professional in c++
Re: C++ Helpline by BlueMagnificent(m): 5:52pm On Nov 09, 2014
peterincredible:
sorry for asking 2 much questions sha but i want to ask how many month did it take you to learn c ++ and after learning it how will i start using and adding graphics i am asking this because i am teaching my self c++ pls answer because i want to be a professional in c++

I can't really figure out how many months it took me to learn C++, just like you, I too taught myself. Besides according to Bjarne, the inventor of C++, "C++ is a language you grow with", and I must say that he is very right. You don't have to learn every part of C++ cos most time you won't be needing some of these parts. Learning the basic part, including a simple introduction to OOP, shouldn't take you more than six months. But to master C++ it will be best to take up some programming projects to test yourself or even download some opensource projects online and read their source codes, this will really have you well grounded.
For Graphics, you must first learn how to use third party libraries in your projects, with this you'll be able to use graphic libraries like Direct3D and OpenGL, or advanced wrapper of these as contained in SDL and SFML.
I love your passion, keep it burning smiley
Re: C++ Helpline by liliian(f): 12:55pm On Apr 11, 2016

(1) (Reply)

Videos Tutorial / Ebooks / How Profitable Is Android App Development In Nigeria? / How Can I Be Ccna Certified

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 60
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.