PDA

View Full Version : can anyone help me?


sayuki288
November 21st, 2007, 01:10 AM
i need to learn c++ to pass college but i suck at it can you tell me where to learn c++ fast and easy?

mouseboyx
November 21st, 2007, 01:20 AM
What types of programs do you have to make?

LaRoza
November 21st, 2007, 01:21 AM
My wiki? I'm sure something there will help.

sayuki288
November 21st, 2007, 01:30 AM
What types of programs do you have to make?

the basic types of programs and some complex types

LaRoza
November 21st, 2007, 01:45 AM
the basic types of programs and some complex types

That narrowed it down.

If you have trouble with C++, look through my wiki (on the C++ page) the "Learn C++" link might help.

It also helps to have a terminal and editor open, so you can compile and run programs.

MrFSL
November 21st, 2007, 03:07 AM
i need to learn c++ to pass college but i suck at it can you tell me where to learn c++ fast and easy?

I remember those days. Let me guess you are dealing with programming in a Win32 environment with Microsoft Visual C++?

Whenever you "have" to learn something and you find it extremely difficult to do so try finding a better teacher. -- Always worked for me.

sayuki288
November 21st, 2007, 05:11 AM
i just need some getting used to in c++ and i wanna look for some exercises and tutorials for it

xyz
November 21st, 2007, 05:14 AM
@ LaRoza
Sorry off topic but that one had me LOL too much!!
That narrowed it down.

Kadrus
November 21st, 2007, 12:54 PM
http://www.cprogramming.com/

Read the C++ tutorial/very good :)

Here's your first lesson :

#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World!This is my first C++ program!"<<endl;
return 0;
}

Hope that helped :)

tech9
November 21st, 2007, 12:59 PM
http://www.cprogramming.com/

Read the C++ tutorial/very good :)

Here's your first lesson :

#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World!This is my first C++ program!"<<endl;
return 0;
}
Hope that helped :)

that's just about as basic as you can get with C++=D>

Kadrus
November 21st, 2007, 01:07 PM
that's just about as basic as you can get with C++=D>

Yep..C++ isn't hard to learn..just needs some concentration and patience...

ThinkBuntu
November 21st, 2007, 01:45 PM
I'm just curious, how would one compile and run:
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World!This is my first C++ program!"<<endl;
return 0;
}
I'm of course on my Mac, but I have GCC, G++, and the excellent XCode which I don't know how to use.

CptPicard
November 21st, 2007, 01:48 PM
Yep..C++ isn't hard to learn..just needs some concentration and patience...

And of course, a Hello World in any language doesn't really tell you anything yet of what the language is all about...

C++ is not exactly a starter language, but if the guy has to start with it, my condolences...

Kadrus
November 21st, 2007, 01:51 PM
I'm just curious, how would one compile and run:
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World!This is my first C++ program!"<<endl;
return 0;
}
I'm of course on my Mac, but I have GCC, G++, and the excellent XCode which I don't know how to use.

Piece of cake:copy this code into your text editor and save it
example.cpp
type in terminal
g++ example.cpp
it should compile bug free as it did with me
then type
./a.out

And you should see this in terminal

Hello World!This is my first C++ program!

I hope that helped :)

MicahCarrick
November 21st, 2007, 04:25 PM
i need to learn c++ to pass college but i suck at it can you tell me where to learn c++ fast and easy?

Well, if your only aim is to pass your course for college, then you're going to struggle a bit more. If you actually enjoy programming and figuring out how things work, then it would be much easier.

If you don't care much about it, just work through your text, do every example, and take the labored boring approach. Though, one would wonder why you're even taking a C++ class.

If you do in fact enjoy programming, but just "suck at it", then fear not, we all did at one point. The learning curve can be a bit steep. Start with simple programs in various tutorials and in your text, and patiently ask yourself "what does this do?" and "what happens if I change this?"

For example, the code previously posted was:

#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World!This is my first C++ program!"<<endl;
return 0;
}

Do some googling, check you text or Wiki's, and find out what an #include is. What does "using namespace" mean and what happens when you take it out and try to compile it. etc.

LaRoza
November 21st, 2007, 06:05 PM
The example used a "using namespace" directive, I don't recommend using them at first, so you don't get confused when you see code that is fully qualified.


#include <iostream>

int main(int argc,char ** argv)
{
std::cout << "Hello world" << std::endl;
return 0;
}

Kadrus
November 22nd, 2007, 03:35 AM
Try reading some tutorials for here..they are very very detailed...

http://www.cplusplus.com/doc/tutorial/

Be patient and enjoy programming :)

sayuki288
November 22nd, 2007, 10:47 AM
where can i download a compiler for win32

xeth_delta
November 22nd, 2007, 10:57 AM
where can i download a compiler for win32

Try this one: http://www.bloodshed.net/devcpp.html

There is also a book I would suggest for beginners, it is called "Sam's Teach yourself C++ in 21 days".

Good luck,
Xeth

sayuki288
November 22nd, 2007, 11:01 AM
thnx
:)

Cannaregio
November 22nd, 2007, 11:11 AM
There is also a book I would suggest for beginners, it is called "Sam's Teach yourself C++ in 21 days".


Yep, that's a book you could use.
Here it is:
http://www.google.com/search?hl=en&client=opera&rls=en&hs=jCY&q=+%22Sam%27s+Teach+yourself+C%2B%2B+in+21+days%22 +-amazon+-price&btnG=Search

More c++ resources listed here:
http://library.thinkquest.org/C0111571/links.php

This said, learning a programming language is a matter of experimentation and interest.
Imho python is 100 times more important than C++ nowadays, especially if you have a little phantasy and love experimenting. Besides, FINDING learning books on the web is extremely easy, as the example google searchstring above demonstrates, the point is actually READING and USING them. This is much harder: we all have tons of books that we only perused and never really took the time to study.

xeth_delta
November 22nd, 2007, 01:09 PM
I forgot to mention another good site for programming resources and books in PDF format: http://www.mindview.net/.

Xeth

Kadrus
November 22nd, 2007, 05:01 PM
The example used a "using namespace" directive, I don't recommend using them at first, so you don't get confused when you see code that is fully qualified.


#include <iostream>

int main(int argc,char ** argv)
{
std::cout << "Hello world" << std::endl;
return 0;
}


That code is even easier than the one you wrote :
#include <iostream>

int main()
{
std::cout << "Hello, world!\n";
}

sayuki288
November 23rd, 2007, 07:25 AM
i need a compiler that lets me see what the program looks like when i run it

LaRoza
November 23rd, 2007, 07:32 AM
That code is even easier than the one you wrote :
#include <iostream>

int main()
{
std::cout << "Hello, world!\n";
}


std::endl does more than \n. It should be used.

LaRoza
November 23rd, 2007, 07:33 AM
i need a compiler that lets me see what the program looks like when i run it

Do you mean IDE?

What do you mean by "lets you see what the program looks like when you run it"?

Kadrus
November 23rd, 2007, 07:37 AM
Do you mean IDE?

What do you mean by "lets you see what the program looks like when you run it"?

I think he means that he wants to see the code that he has written..

sayuki288
November 23rd, 2007, 07:38 AM
Do you mean IDE?

What do you mean by "lets you see what the program looks like when you run it"?

something like turbo c or something like when you run tc it shows hello on some screen when i compile hello woeld program lol

LaRoza
November 23rd, 2007, 07:38 AM
something like turbo c or something like when you run tc it shows hello on some screen when i compile hello woeld program lol

I don't understand. Do you want a GUI?

Compile through the command line, and use Gedit (or another editor) to edit.

Kadrus
November 23rd, 2007, 07:39 AM
And didn't you download a compiler by the way?
I thought you downloaded from this site for Windows
http://www.bloodshed.net/devcpp.html
Weird!

LaRoza
November 23rd, 2007, 07:40 AM
And didn't you download a compiler by the way?
I thought you downloaded from this site for Windows
http://www.bloodshed.net/devcpp.html
Weird!

sayuki288 is using DevCPP?

ukripper
November 23rd, 2007, 07:47 AM
There is no fast way to learn any language it all comes down to dedication and time maangement when learnign any new programming.

i would suggest you sit down and make a time table.
Dedication is the key and then undersatnding concepts before you start actual coding. OOP is your tool!

Happy programming!!

Kadrus
November 23rd, 2007, 07:49 AM
sayuki288 is using DevCPP?
That's what it says in page 2 of the thread..read
http://ubuntuforums.org/showthread.php?t=618958&page=2

Kadrus
November 23rd, 2007, 07:50 AM
There is no fast way to learn any language it all comes down to dedication and time maangement when learnign any new programming.

i would suggest you sit down and make a time table.
Dedication is the key and then undersatnding concepts before you start actual coding. OOP is your tool!

Happy programming!!
100% agreed :)

xeth_delta
November 23rd, 2007, 08:07 AM
sayuki, DevC++ should show a terminal when you run your compiled program, but it might just pass very fast over the screen. You can add some instructions for the program to wait for a key to pe pressed after showing "Hello!".

I have not used DevC++ since quite some time ago, but if I recall right, you can choose between different project types during start-up. Just choose console / command line project.

Just out of curiousity. Since you have a linux machine, why don't you program in linux? The environment is, IMHO, a lot more sane for software development.

You can edit the source files in a text editor (kate, gedit, vim) and compile from a terminal.

If you would like to use an IDE I would recommend Anjuta or Eclipse.

Xeth

sayuki288
November 23rd, 2007, 08:34 AM
sayuki, DevC++ should show a terminal when you run your compiled program, but it might just pass very fast over the screen. You can add some instructions for the program to wait for a key to pe pressed after showing "Hello!".

I have not used DevC++ since quite some time ago, but if I recall right, you can choose between different project types during start-up. Just choose console / command line project.

Just out of curiousity. Since you have a linux machine, why don't you program in linux? The environment is, IMHO, a lot more sane for software development.

You can edit the source files in a text editor (kate, gedit, vim) and compile from a terminal.

If you would like to use an IDE I would recommend Anjuta or Eclipse.

Xeth


lol i thought dev c++ doesnt show a terminal or something