00:00
00:00
Newgrounds Background Image Theme

NobeastcanDefeatme just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

C++: Main

39,572 Views | 135 Replies
New Topic Respond to this Topic

Response to C++: Main 2006-05-21 16:29:07


Response to C++: Main 2006-05-22 20:35:13


I'd like to request a tutorial on Functions from one of the C++ masters here.

Response to C++: Main 2006-05-22 21:17:00


At 5/22/06 08:35 PM, Naois wrote: I'd like to request a tutorial on Functions from one of the C++ masters here.

C++: Basic Functions

Made upon your request.

Response to C++: Main 2006-05-25 16:48:48


At 5/22/06 09:17 PM, CaptinChu wrote: C++: Basic Functions
Made upon your request.

Thanks!

Response to C++: Main 2006-05-25 21:02:48


What shoudl I write my next tutorial on?? Iv'e been wanting to write one for some time just don't know what

Response to C++: Main 2006-05-26 12:51:49


can i request a tutorial on classes/member functions?

i have never really used a class.

thanks!

Response to C++: Main 2006-05-26 13:57:43


At 5/26/06 12:51 PM, sheffgb wrote: can i request a tutorial on classes/member functions?

i have never really used a class.

thanks!

Yes, I got dibs on this one fellas :D i'll start it later today or early tomorrow morning!

Response to C++: Main 2006-06-17 17:10:54


At 5/26/06 01:57 PM, Jcrypt wrote:
At 5/26/06 12:51 PM, sheffgb wrote: can i request a tutorial on classes/member functions?
Yes, I got dibs on this one fellas :D i'll start it later today or early tomorrow morning!

So... Are you going to actually do it? It's been almost a month...

Response to C++: Main 2006-06-18 12:14:05


omg i keep getting this problem, with every program:

when i insert for example this code:

#include <iostream>

int main()
{
std::cout << "Hello World!";
char response;
std::cin >>response;
return 0;
}

and then hit compile and run, the program wont run, and i get an error telling me that some file is not found.
Please help me, i get this with every program!

Response to C++: Main 2006-06-18 16:47:09


It sounds to me your header file 'iostream' is what it's saying is not found... if this is the case re-install your compiler seeing as the paths were messed up.

Response to C++: Main 2006-07-11 12:16:29


At 6/18/06 12:14 PM, iv00w wrote: omg i keep getting this problem, with every program:

when i insert for example this code:

#include <iostream>

int main()
{
std::cout << "Hello World!";
char response;
std::cin >>response;
return 0;
}

and then hit compile and run, the program wont run, and i get an error telling me that some file is not found.
Please help me, i get this with every program!

I'm sorry for the late response, but I see the problem. Are you used to typing in php code? If so, that might explain why the error existed.

You see, C++ is not a dynamic language. You must put ALL of your declared variables at the top of int main()

I hope that helps. If it doesn't, oh well...

BTW, I made a big, awesome tutorial on Structures and Classes. It doesn't quite go in-depth with classes yet, but I'm going to probably add that later in the topic.

Response to C++: Main 2006-08-01 21:58:15


At 6/18/06 12:14 PM, iv00w wrote: and then hit compile and run, the program wont run, and i get an error telling me that some file is not found.
Please help me, i get this with every program!

I tried it and it worked fine.

have I just bumped a really old thread? oh well

Response to C++: Main 2006-08-01 23:34:41


At 7/11/06 12:16 PM, CaptinChu wrote: You see, C++ is not a dynamic language. You must put ALL of your declared variables at the top of int main()

You're thinking of C. C++ allows for variable initialization any where.

#include <iostream>
using namespace std;

int function(int);

int main()
{
int a = 5;
cout<<a<<endl;
int b = 6;
cout<<b<<endl;
int c = 7;
c = function(c);
cout<<c;
return 0;
}

int function(int c)
{
return c+5;
}

Response to C++: Main 2006-08-12 15:00:45


helped

Response to C++: Main 2006-08-13 09:25:03


Captin Chu's Guide to basic C++ (part two)

I really hope the guides that I've been making were helpful.

Response to C++: Main 2006-08-13 10:45:52


I am requesting a nice guide on how to use the swith function in c++, i think it is called a swicth. the command that lets you go,

if a =

1 > do this
2> do this

etc.

as you can, i have no idea how it works for c++

Response to C++: Main 2006-08-13 12:44:59


At 8/13/06 10:45 AM, thecoshman wrote: I am requesting a nice guide on how to use the swith function in c++, i think it is called a swicth. the command that lets you go,
if a =
1 > do this
2> do this
etc.
as you can, i have no idea how it works for c++

It's basically a cleaner way to write comparison statements. Don't know if it warrants it's own tutorial though.
---------------
int iValue = 0;
cin>>iValue;
switch(iValue){
case 1: cout<<"You entered 1\n";
break;
case 5: cout<<"You entered 5\n";
break;
default: cout<<"You entered something besides 1 or 5\n";
}
--------------- is equivalent to
int iValue = 0;
cin>>iValue;
if(iValue == 1) cout<<"You entered 1\n";
else if(iValue == 5) cout<<"You entered 5\n";
else cout<<"You entered something besides 1 or 5\n";
--------------is equivalent to
int iValue = 0;
cin>>iValue;
iValue == 1 ? cout<<"You entered 1\n" : iValue == 5 ? cout<<"You entered 5\n" : cout<<"You entered something besides 1 or 5\n";

Response to C++: Main 2006-08-18 21:28:01


At 8/13/06 12:44 PM, 0x41 wrote: stuff

can some one like make a tut.. and explaining this?
Im lost at the biggining..

Response to C++: Main 2006-08-18 21:34:04


At 8/18/06 09:28 PM, phyconinja wrote:
At 8/13/06 12:44 PM, 0x41 wrote: stuff
can some one like make a tut.. and explaining this?
Im lost at the biggining..

Some day, I'll make my third part to my guide of basic C++. In that, I'll explain if, else, switch, more on functions, and basic structures and classes.

For those few who were wondering, I will stop at the fourth and final part of basic C++, "The last of what I know." It will be on extended classes and everything I know about ios. If you could get through all four parts of my guides... yea, you'd pretty much know everything I do about C++. Pretty pathetic, really. : /

Response to C++: Main 2006-08-18 23:42:31


At 8/18/06 10:19 PM, KurtGodel wrote:

:code

hmmm, getting some conflicting information here :-O.

http://en.wikibooks...rogramming/Variables

"In C, all variable declarations (except for globals) must be done at the beginning of a block. You cannot declare your variables, insert some other statements, and then declare more variables. Variable declarations (if there are any) are always the first part of any block."
Are you compiling the C program with a C++ compiler? Maybe I'm (and the wiki editors) are getting C rules and C conventions confused with each other.

Response to C++: Main 2006-08-21 23:50:15


Oh Noes i missed this page. >:(

Response to C++: Main 2006-08-21 23:56:38


Nice update. Glad to see this is starting to move along!

Response to C++: Main 2006-08-22 09:17:57


At 8/21/06 02:06 PM, Afro_Ninja wrote:
Helpful Links:
C Programming
C Plus Plus
C++ Video Tutorial 1
C++ Video Tutorial 2
Online C++ Tutorial
C++ Tutorials
C++ Programming Tutorial

page not found..

check the link!!!

Response to C++: Main 2006-08-22 09:45:13


At 8/22/06 09:17 AM, phyconinja wrote:
At 8/21/06 02:06 PM, Afro_Ninja wrote:
Helpful Links:
C Programming
C Plus Plus
C++ Video Tutorial 1
C++ Video Tutorial 2
Online C++ Tutorial
C++ Tutorials
C++ Programming Tutorial
page not found..

check the link!!!

They work for me :S


|| Portfolio || Facebook || Twitter ||

BBS Signature

Response to C++: Main 2006-08-22 09:56:23


At 8/22/06 09:45 AM, DannyIsOnFire wrote:
At 8/22/06 09:17 AM, phyconinja wrote:
page not found..

check the link!!!
They work for me :S

only bottom doesnt work..
all other to show where it was..

Response to C++: Main 2006-08-22 16:03:17


Yay! I'm finally part of a tutorial list!

Response to C++: Main 2006-08-25 04:51:10


Response to C++: Main 2006-08-26 17:30:08


C/C++: Using va_lists

very cool intermediate guide made by me

Response to C++: Main 2006-09-04 07:03:17


C++: Digital Clock Code

Happy hundred, indeed. : )