Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

C & C++ What ?


  • Please log in to reply
6 replies to this topic

#1 bluehyppo23

bluehyppo23

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Local time:02:12 PM

Posted 13 October 2006 - 04:00 PM

HI.....
I'm a student at Form 4 or Grade 4 ... or for people that 16 years old like me .....
I studied at Technical School at Malaysia ... I take Computer Programming Course ... and in that course it divided into 2 part (this course in 2 years )
first part is Programming & Development Tools..
It is about HTML, Word , Power Point , Excel and Macromedia Director MX

and another part is Fundamental Of Programming.
It is about C language ,C++ , OS(MSDOS ,Windows & Linux ) , Java & Business

and now i'm in the year 1 ..
i already learn C , C++ , OS ( not include linux)

Java & Business in next year...

but i think in this school
i just learn a very-very low level.
this is the example of C and C++ language that i already finish learn.

#include <stdio.h>
#include <conio.h>

int rectangle();

rectangle(int x, int y)
{
   int area;
   area=x*y;
   return(area);
}

void main()
{
  int a, b;
 clrscr();
 printf("Please Enter the length of the rectangle : ");
 scanf("%d",&a);
 printf("\nPlease Enter the width of the rectangle : ");
 scanf("%d",&b);
 clrscr();
 printf("The area of the rectangle : %d",rectangle(a,b));
 getch();
}

*I think there is wrong, because i dont really understand at function pasing parameter :lmao:

example C++ that i learn
#include <iostream.h>
#include <conio.h>

class Test
{
	  public:
	   int a,b;
	   void display()
	   {
		 cout<<"The area of rectangle : " << a+b;
	   }
	   void insert();
};

Test::insert()
{
 cout<<"Insert the length : ";
 cin>>a;
 cout<<"\nInsert the width : ";
 cin>>b;
 }

void main()
{
 Test test1;
 clrscr();
 test1.insert();
 test1.display();
 getch();
 }


so i dont know what the uses of C & C++ ?
i know it can make a program Interactive but in Turbo C++ compiler ... it look like creating stupid program.. but i think it very usefull also :thumbsup: hehehe ....because easy to understand PHP ..
can you tell me the real uses of C++ or C .... what i can create with this language .. :flowers:

and can i know what is the real use of constructor and destructor ?? :trumpet:

BC AdBot (Login to Remove)

 


#2 AnonArtist

AnonArtist

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:12:12 AM

Posted 15 October 2006 - 06:15 AM

I can't answer all of your questions (cause well...I'm not a programmer really - I'd rather texture than code), but the uses of C/C++ are fairly diverse, for example in the game development area - C++ is often used as the workhorse for developing both the games and the in-house tools for the development team. Programmers are pretty much required to have a working, in-depth knowledge of the language to work in the industry, except in very specific circumstances.

I never got into upper level programming in any of my courses, the further along you get in learning most of the major languages, the more expansive you'll find their capabilities (C++ can do a lot more than simply show the area of a rectangle in plain text :thumbsup: - even BASIC can do more than that heh).

Hope that helps answer at least a little bit of your questions. I'm sure someone more knowledgable will come along and help you with the rest.

#3 bluehyppo23

bluehyppo23
  • Topic Starter

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Local time:02:12 PM

Posted 15 October 2006 - 10:22 AM

yea .. i still thinking about the use of this language ...

#4 Grinler

Grinler

    Lawrence Abrams


  • Admin
  • 43,665 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:01:12 AM

Posted 24 October 2006 - 10:27 AM

You can create any type of program with C/C++.

When learning any language, you start out with basic programs. For example your code above asks for the dimensions and outputs the area of a rectangle. Though, not necessarily useful in every day life, the code is the building blocks of other more advanced programs.

C/C++ is one of the most powerful languages used commercially. For example, Windows was designed using C++ and assembly. As you can see from the complex program like Windows, C/C++ are very useful.

C allows you to get into the finer details of coding allowing you to create any type of software you want.

#5 projectfocus

projectfocus

  • Members
  • 479 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Brighton
  • Local time:07:12 AM

Posted 02 November 2006 - 11:39 AM

As far as I can tell the differance when I did my courses in Programming is that C++ has more predefined functions. It means that instead of having to write the procedures yourself that you do in C they are allready defined in C++.

I know that C++ was used for polymophasysm but I am not sure if that can be done in C. To be honest that again is only to save code and processing power. C will do the same as C++ just will take you longer to write it and alot more thinking.
FocusToonSigStreched.jpg

#6 Arenlor

Arenlor

  • Members
  • 27 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Here
  • Local time:02:12 AM

Posted 03 November 2006 - 02:26 PM

C++ is a very powerful language it's actually a C Pre-Processor (it gets written by a compiler into C and then compiled, which is why most C++ compilers can do C also) It's also one of the more basic languages (basically C is on the first step up from assembly, which is the first step up for hex/machine code.) It can do anything that you want it to really.

#7 petocities

petocities

  • Members
  • 102 posts
  • OFFLINE
  •  
  • Location:Santiago Chile
  • Local time:03:12 AM

Posted 04 November 2006 - 02:43 PM

Not adding too much to what is already said, C is also an older code. C++ has another orientation (OO), and adds more flexibility, reusability and easier understanding of the coding itself.
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users