Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

HARD?


  • Please log in to reply

#1
Canorro

Canorro

    Member

  • Member
  • PipPipPip
  • 130 posts
I wanna start learning C++.But looking at all those code makes me think i wont remember so how did you get around with all does code?
Also Visual its easier or harder than C++ :) ??
  • 0

Advertisements


#2
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts
I am not familiar with C++ but I can tell you that reading code is always hard.
Sometimes I have trouble understanding what I wrote only a year ago.

Just start with the basics and I'm sure you'll get the hang of it. :)
  • 0

#3
Canorro

Canorro

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 130 posts
Ok i will try harder thx
Also were did you learn your to code and what was your first language?

Edited by Canorro, 22 February 2008 - 05:53 PM.

  • 0

#4
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts
I started out with PHP and mostly taught myself, but I used these sites a lot
http://www.w3schools...php/default.asp
http://nl3.php.net/manual/en/index.php
http://www.homeandle...uk/php/php.html
  • 0

#5
Canorro

Canorro

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 130 posts
Ok that will be my second language thank you :)
  • 0

#6
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts
Bear in mind that PHP and C++ have completely different objectives.
C++ is used to create stand-alone applications. PHP is designed for interactive websites.
  • 0

#7
Canorro

Canorro

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 130 posts
Yes I read that on those site that you gave but I also want to create internet sites.And learn mutiple languages like 3-5. :)
Thank you for the info
  • 0

#8
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts
You're welcome. :)

Good luck on your studies.
  • 0

#9
quim88

quim88

    Member

  • Member
  • PipPip
  • 32 posts
I don’t know why most beginners are afraid of C++. They say C++ is hard, but it really is not.
This should get you started.
C++ Info:
http://www.cplusplus.com/doc/tutorial/
http://www.cplusplus.com/
http://www.cppreference.com/
http://en.wikipedia.org/wiki/C%2B%2B
http://www.research....om/~bs/C .html

Visual Studio Express 2008 ( Compiler, IDE )
http://www.microsoft.com/express/vc/
Short program with explatnation, by me:
Code
#include <iostream>

using namespace std;

int main()
{
	// Declare varibles
	double number1;
	double number2;
	double result;

	// prompt user for input
	cout << "Enter number 1: ";
	cin >> number1; // get number1

	cout << "Enter number 2: ";
	cin >> number2; // get number2

	// calculate
	result = number1 + number2;

	// display result
	cout << number1 << " + " << number2 << " = " << result << "\n";

	// main must allway return something
	return 0;
}

Explanation

/* #include is used to include :) a header file
in this case #include <iostream> includes the iostream.h
of standard library -- iostream provide input and output stream
in you program the default is the console window*/

#include <iostream>


/*this will include the std namespace -- namespace is really an
advance part of C++ so i don't want to get into details
you should just know that if you dont't write this statement
you will have to say std::cout, std::cin, std::end,...*/

using namespace std;


/* main is the main entrance to you program -- this is where your
program will start executing all C++ program must have one and only
one main funtion and main must return an int */

int main()
{

/* As you can see this is how you declare a variable datetype
folllowed by an identifier. In this tutorial i used the double datatype.
Here are some more data type: void, int, char, float.
Read a book to learn about Modifiers ( unsigned, signed, long, short )*/

// Declare varibles
double number1;
double number2;
double result;


/* cout is an object of class ostream. cout is used to display text to
the console. Notice that you use the << , extraction operator, to display text */

// prompt user for input
cout << "Enter number 1: ";


/* cin is an object of class istream. cin is used to retrive input from keyboard.
Notice that you use >> , called , insertion operator to get input.*/

cin >> number1; // get number1

cout << "Enter number 2: ";
cin >> number2; // get number2


/* this works just like algebra math, = assigns what ever is in the
right to the varialbe on the left*/

// calculate
result = number1 + number2;


/* Notice how i use the insertion operator ( << ) THIS TIME */
// display result
cout << number1 << " + " << number2 << " = " << result << "\n";


return 0;
}
  • 0

#10
Granz00

Granz00

    Member

  • Member
  • PipPipPip
  • 226 posts
Forget about remembering code. Rather, learn the logic and practice using the code. Whatever code you don't remember is the code that you don't use enough. So when you need to use it, just look it up. C++ is my first, and almost only language that I have learned so far. I have touched a little bit of VBScript, and an extremely small amount of HTML.

I have this to say about learning computer languages. Think about things that you want to try to accomplish. Rather then waiting to find magical code that may or may not exist, try and think of ways to reach your goals with the knowledge you already have.

Also, some things in programming will make a lot more sense if you have some basic computer knowledge.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP