I want to see who here knows anything in C++.
If you are a beginner or a expert.
Printable View
I want to see who here knows anything in C++.
If you are a beginner or a expert.
I took c & c++ like two years ago but dont use them much anymore and have moved on to java.
I know some C/C++, but at the moment my main "expertise" (using that word rather loosely) lies in Java. I take C/C++ courses next year so I presume I'll move on then.
I taught myself c in high school, one of my first languages, i started with a beginners book, then intermediate, and advanced. In college I've taken two classes on c++ and gone as far as link listing, object oriented, etc...
Although I work with other languages than c and c++ the concepts that they teach i feel makes them very important to learn :)
i used to do some c++ but b/c of my new job i mostly use perl :(
Good Day,
When you find someone who knows some C++, then what....... :eek: lol/n;Quote:
I want to see who here knows anything in C++.
// I try to avoid it whenever possible
/* However seems it always finds me */
Say hello to them........Quote:
When you find someone who knows some C++, then what....... lol/n;
Heh, wow.. I haven't been much into programming in awhile. I know C/C++, both are good languages to know. Took me awhile to learn 'em though. :(
#include "stdafx.h"
int main(int argc, char* argv[])
{
printf("Hi I know a bit of c !\n");
printf("Do you ? \n");
return 0;
}
MoonWolf why did you need to pass arguments from the command line?
Yeah I can work out a bit of C/C++. Hello to you too!
So what, since I don't know C++, you won't say hi to me???
Insensitive ***** :D
Code:/*Find the factorial of a given number -(as far as unsigned long int(s) go)-
By: AxessTerminated
P.S. This program is a nice example of recursive functions
*/
#include <iostream.h>
unsigned long x;
unsigned long my_fact(unsigned long x);
main(){
cout << "Find factorial of..\n";
cin >> x;
cout << "Factorial of " << x << " is\n";
cout << my_fact(x) << endl;
system("pause");
return 0;
}
unsigned long my_fact(unsigned long x)
{
if (x <= 1 )
return 1;
else
return x * my_fact(x - 1);
}
Once again, another app by God, Himself :)
j/p, im still rather new to the language, just figured I could post some things...
:::::::::::::::::::::::::::::::::::::::::::::
Code:/*Probability Simulator 1.7
by: AxessTerminated
Version History
Version Description/Changes
---------------------------------------------
v.0.9 Die Roller
v.1.2 Added primitive coin flipping
v.1.5 Added Random Number Generation
v.1.5.1 Added The Quit Option ;)
v.1.5.2 Added Version History
v.1.7 Program restarts instead of exiting--"goto start;" at end of main()
*/
#include <iostream.h>
int fdice();//For dice rolling.
int fcoins();//For coin flipping.
int frand();//For the random number generator.
int gen;//Amount of generations.
int range;//the variable that specifies 0-x, or 1-x (e.g. 1-6 for 6 sided dice).
int x;//In the for() loop to simulate multiple generations.
int zero_inc;//variable to define the inclusion of zero (0-x or 1-x)
int choice;
main()
{
start:
system("cls");
cout << "1. Coins\n2. Dice\n3. Random Number Generator\n4. Quit\n:";
cin >> choice;
switch(choice)
{
case 1:
fcoins();
break;
case 2:
fdice();
break;
case 3:
frand();
break;
case 4:
return 0;
default:
goto start;
}
goto start;
}
//Roll Dice
int fdice()
{
system("cls");
cout << "How many dice?\n:";//How many generations of rand() do you want?
cin >> gen;
cout << "How many sides on the dice?\n:";
cin >> range;
srand(time(0));
system("cls");
for(x=1; x <= gen; x++)
{
cout << "Roll #" << x << ": " << rand() % range+1 << endl;
}
system("pause");
}
//Flip Coins
int fcoins()
{
system("cls");
cout << "How many coins?\n:";//How many generations of rand() do you want?
cin >> gen;
range = 2;
srand(time(0));
system("cls");
for(x=1; x <= gen; x++)
{
cout << "Flip #" << x << ": " << rand() % range+1 << endl;
}
system("pause");
}
int frand()
{
system("cls");
cout << "How many numbers?\n:";//How many generations of rand() do you want?
cin >> gen;
cout << "Include 0? 0=Yes, 1=No\n:";
cin >> zero_inc;
cout << "Maximum Number?\n:";
cin >> range;
srand(time(0));
system("cls");
for(x=1; x <= gen; x++)
{
cout << "Integer #" << x << ": " << rand() % range+zero_inc << endl;
}
system("pause");
}
I have a site: www.angelfire.com/linux/axessterminated
there is a a C++ page on there (link on the left) also a link to a friends site:
http://lexclient.cjb.net
That's phil, he's pretty damn good with C++, check it out.
Also, do you program yourself, or are you looking to learn?