News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

About using Code Blocks

Started by jupa, August 03, 2010, 04:06:11 PM

Previous topic - Next topic

jupa

Hi!

I have the next program to execute and compile but my problem is that I'm using C but some extensions of C++ like functions cout and cin.

#include <stdio.h>
int main ()
{

int n;

cout <<"Ingrese un entero:";

scanf ("%d", &n);

cout << "Entero ingresado:" << n << endl;

return 0;
}

And I don't know why when I try to compile it the compiler display errors of compilation.
Perhaps I forgot some confugurations...

I aprecciate some help

Thank's

Jenna

Make sure the file is named *.cpp, so C::B knows it's a c++-file and uses the correct compiler.

There are several other things missing from your source and it will not compile (even not with a c++-compiler), but that is basic c++-stuff and questions like this are not allowed in our forum/on our website.

Please read a good book about beginners programming in c++ (or a tutorial) or ask in a c++-forum.

Otherwise you violate our forum rules and your topic will most likely become locked.