Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,837 members, 7,817,473 topics. Date: Saturday, 04 May 2024 at 12:52 PM

C++ Thread For Beginners - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / C++ Thread For Beginners (2962 Views)

Thread For Nairaland Algorithm Questions / Thread For International Remote Tech Jobs - US, UK, Canada, Germany, UAE... / A Thread For Tutorial On Python Programming (2) (3) (4)

(1) (2) (Reply) (Go Down)

C++ Thread For Beginners by Nobody: 1:29pm On Oct 17, 2017
This is a thread for beginners in the realm of c++. If you are still a beginner like me, kindly register your name on this thread.


Aims Of Thread

* To share study materials.


* To solve challenges.


* To share codes.

* To ask and answer question.


* And whatever will help our progress.


What is C++?


If you haven't heard of c++, c++ is a general purpose language designed by Bjarne Stroustrup. C++ is object oriented and can be used to create almost all applications for desktop or mobile NDK. Since c++ is a bit closer to low level language it is usually called a middle level language. And yes c++ can be used in embeded system and game development.


C++ simply means C +1.



Board is open for all the citizens of C/C++ Republic.


Oya grin
Re: C++ Thread For Beginners by Nobody: 1:31pm On Oct 17, 2017
Re: C++ Thread For Beginners by Nobody: 2:39pm On Oct 17, 2017
Re: C++ Thread For Beginners by Nobody: 3:27pm On Oct 17, 2017
WHY C++ IS THE RIGHT CHOICE


1. You can do everything with c++


Just think about that thing you wanna do with a programming language, c++ will do it with efficiency. From desktop apps, mobile apps, game development, embeded system, web apps like facebook, e.t.c


2. VERY FAST
Yes! since c++ is compiled and not interpreted, and also translated to assembly makes it the right choice when performance is the theme of the day!!
Re: C++ Thread For Beginners by Nobody: 3:32pm On Oct 17, 2017
we are with you
Re: C++ Thread For Beginners by Nobody: 4:01pm On Oct 17, 2017
GameKartel:
we are with you
welcome bro, i'm a beginner. What about you?
Re: C++ Thread For Beginners by bolkay47(m): 4:11pm On Oct 17, 2017
Nice thread!
You should consider posting some interesting questions or challenges so as to keep the thread 'warm' and interactive.
Re: C++ Thread For Beginners by Nobody: 4:44pm On Oct 17, 2017
bolkay47:
Nice thread!
You should consider posting some interesting questions or challenges so as to keep the thread 'warm' and interactive.
Welcome bro, just what i was thinking.


CHALLENGE 1: CALCULATOR v1


Write a program that helps us calculate addition and subtraction of two given input.


EG. USER chooses an operator like addition (+) then input two numbers like 1 and 3. The computer processes the input and give us 4.


You can write the code on http://ideone.com and share the link.
Re: C++ Thread For Beginners by SilverG33k(m): 6:26pm On Oct 17, 2017
Gosh I love c++, I did it last year when I was in 200l, syntax so beautiful
#include <iostream> Using namespace std;
int main() { return 0; }
Gosh, but no time to code c++ again, java already got my soul
Re: C++ Thread For Beginners by Nobody: 6:35pm On Oct 17, 2017
SilverG33k:
Gosh I love c++, I did it last year when I was in 200l, syntax so beautiful

#include <iostream>
Using namespace std;

int main()
{
return 0;
}

Gosh, but no time to code c++ again, java already got my soul
lol, welcome bro. Java?? maybe when i'm done learning cplusbae. Java dey scatter my brain but c++ just dey flow like fresh water. cheesy
Re: C++ Thread For Beginners by SilverG33k(m): 8:51pm On Oct 17, 2017
TobiTobiTobiWhy:
lol, welcome bro. Java?? maybe when i'm done learning cplusbae. Java dey scatter my brain but c++ just dey flow like fresh water. cheesy

I'm still at the beginners level in java, but I know what my codes can do....
.
.
At first, last year december to be precise, I saw one java syntax and it scared the shit outta me, I started android dev january this year, right now, you'd be amazed with what I have done, not bragging tho
.
.
So don't be scared, java is fun especially if you have an awesome IDE
.
.
Back to c++, what project do you think needs c++? Just pick up a big(not too big) c++ project and start executing, the more you get the work done, the more you learn c++, that was how I learn java
Re: C++ Thread For Beginners by Nobody: 4:37am On Oct 18, 2017
SilverG33k:

...
.
.
At first, last year december to be precise, I saw one java syntax and it scared the shit outta me, I started android dev january this year, right now, you'd be amazed with what I have done, not bragging tho
.
.
So don't be scared...
.
.
Back to c++, what project do you think needs c++? Just pick up a big(not too big) c++ project and start executing, the more you get the work done, the more you learn c++, that was how I learn java
Yea thanks, Java has you paint it is okay, infact most programmers in Nigeria focus on Java but i'll learn java when i want to dive into android. As for now, i'm focusing on game development. Java can also be used but performance is important to me. I might even learn c#(looks like java), python before java. Like i said, i'll learn Java when i want to dive into android.


What big project can you suggest? i'll like to try em. I don't mind if it's android, i'll use ndk for it.


cool
Re: C++ Thread For Beginners by SilverG33k(m): 7:40am On Oct 18, 2017
TobiTobiTobiWhy:
Yea thanks, Java has you paint it is okay, infact most programmers in Nigeria focus on Java but i'll learn java when i want to dive into android. As for now, i'm focusing on game development. Java can also be used but performance is important to me. I might even learn c#(looks like java), python before java. Like i said, i'll learn Java when i want to dive into android.


What big project can you suggest? i'll like to try em. I don't mind if it's android, i'll use ndk for it.


cool
A big project can be anything, just think of something and start, my first android app was a game, not with too much graphics oh, just a small logical game, it took me 6months to get it 80% done, that was how I learn what java is all about, you too can just think of a game you can do with c++, on any platform and you'll see how fast you will learn
Re: C++ Thread For Beginners by Nobody: 8:24am On Oct 18, 2017
SilverG33k:

A big project can be anything, just think of something and start, my first android app was a game, not with too much graphics oh, just a small logical game, it took me 6months to get it 80% done, that was how I learn what java is all about, you too can just think of a game you can do with c++, on any platform and you'll see how fast you will learn
I'll try that. Thanks brother.
Re: C++ Thread For Beginners by ANTONINEUTRON(m): 8:50am On Oct 18, 2017
TobiTobiTobiWhy:
WHY C++ IS THE RIGHT CHOICE


1. You can do everything with c++


Just think about that thing you wanna do with a programming language, c++ will do it with efficiency. From desktop apps, mobile apps, game development, embeded system, web apps like facebook, e.t.c


2. VERY FAST
Yes! since c++ is compiled and not interpreted, and also translated to assembly makes it the right choice when performance is the theme of the day!!

3. IDEAL FOR COMPETITIVE PROGRAMMING
Cause of its fastness, most competitive programmers recommend c++ as the go-to language when participating in the sport.

1 Like

Re: C++ Thread For Beginners by Nobody: 8:56am On Oct 18, 2017
ANTONINEUTRON:


3. IDEAL FOR COMPETITIVE PROGRAMMING
Cause of its fastness, most competitive programmers recommend c++ as the go-to language when participating in the sport.
Thanks brother for that comment, are you a c++ programmer? if yes, your input will be appreciated sir.
Re: C++ Thread For Beginners by ibromodzi: 9:15am On Oct 18, 2017
TobiTobiTobiWhy:
Welcome bro, just what i was thinking.


CHALLENGE 1: CALCULATOR v1


Write a program that helps us calculate addition and subtraction of two given input.


EG. USER chooses an operator like addition (+) then input two numbers like 1 and 3. The computer processes the input and give us 4.


You can write the code on http://ideone.com and share the link.


I'm having problem using that online compiler but here is my code
Re: C++ Thread For Beginners by Nobody: 9:22am On Oct 18, 2017
ibromodzi:


I'm having problem using that online compiler but here is my code
I can't find the code.

For the online compiler, make sure you select c++11 as your language.
Re: C++ Thread For Beginners by ibromodzi: 9:32am On Oct 18, 2017
//The program does simple calculations like add and sub
#include <iostream>
#include <cstdlib>
using std::cout;
using std::cin;

int dosum(int a,int b);
int dosub(int a,int b);


int main()
{
char ans;
int a,b;

cout<<"What type of operation do wish to perform? enter a for additions or s for subtraction\n";
cin>>ans;
if(ans!='a'&& ans!='s')
{
cout<<"You entered the wrong answer for the opration to be performed\n";

exit(1); /*the program exits if the user enters a wrong specification for operation*/
}
cout<<"Input the two numbers\n";
cin>>a, cin>>b;


if (ans=='a'||ans=='A')
{
cout<<"The sum of the two numbers entered is "<<dosum(a,b)<<" \n";
}
else if(ans=='s'||ans=='S')
{
cout<<"The difference of the two numbers is "<<dosub(a,b)<<" \n";
}

return 0;
}

int dosum(int a,int b)
{
return a+b;
}

int dosub(int a,int b)
{
return a-b;
}
Re: C++ Thread For Beginners by excanny: 9:35am On Oct 18, 2017
Where does it run? Any best IDE for it?
Re: C++ Thread For Beginners by ibromodzi: 10:17am On Oct 18, 2017
excanny:
Where does it run? Any best IDE for it?

I'm using cppdroid....
Re: C++ Thread For Beginners by Nobody: 11:12am On Oct 18, 2017
@ibromodzi,
Great code brother, it worked. I would have replied earlier but i was banned.

I used the code to calculate 5-9 and it gave the right answer.

https://ideone.com/5Mb9CY
SUGGESTION: Try replace a and s with + and - respectively.
Re: C++ Thread For Beginners by excanny: 11:26am On Oct 18, 2017
ibromodzi:

I'm using cppdroid....
Any one for Windows Desktop?
Re: C++ Thread For Beginners by supervillain52(m): 11:43am On Oct 18, 2017
TobiTobiTobiWhy:
WHY C++ IS THE RIGHT CHOICE


1. You can do everything with c++


Just think about that thing you wanna do with a programming language, c++ will do it with efficiency. From desktop apps, mobile apps, game development, embeded system, web apps like facebook, e.t.c


2. VERY FAST
Yes! since c++ is compiled and not interpreted, and also translated to assembly makes it the right choice when performance is the theme of the day!!
u said anything even gui ?
Re: C++ Thread For Beginners by supervillain52(m): 11:45am On Oct 18, 2017
TobiTobiTobiWhy:
@ibromodzi,

Great code brother, it worked. I would have replied earlier but i was banned.


I used the code to calculate 5-9 and it gave the right answer.


https://ideone.com/5Mb9CY

SUGGESTION: Try replace a and s with + and - respectively.
No way you use ideone too
Re: C++ Thread For Beginners by Nobody: 11:47am On Oct 18, 2017
supervillain52:
No way you use ideone too
Meaning
Re: C++ Thread For Beginners by Nobody: 11:53am On Oct 18, 2017
supervillain52:

u said anything even gui ?
lol what'syour point There are lots of c++ library and framework to achieve great gui

check out:

*MFC

*COCOA
Rad

*QT

*wxWidgets

*JUCE


so your point
Re: C++ Thread For Beginners by supervillain52(m): 11:54am On Oct 18, 2017
TobiTobiTobiWhy:
Meaning
u use ideone.com to test your codes right
Re: C++ Thread For Beginners by supervillain52(m): 11:55am On Oct 18, 2017
TobiTobiTobiWhy:
lol what'syour point There are lots of c++ library to achieve great gui

check out:

*MFC

*COCOA

*QT

*wxWidgets

*JUCE


so your point
(Facepalm)
you know what nevermind
Re: C++ Thread For Beginners by supervillain52(m): 11:56am On Oct 18, 2017
Backslides out of thread

(1) (2) (Reply)

God as a Computer Programmer <joke> / How To Connet C++ Mfc Application With Mysql / Dear Developers: How Do You Keep Yourself Motivated.

(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. 56
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.