News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

error: ‘system’ was not declared in this scope

Started by s1n, May 08, 2010, 08:31:48 AM

Previous topic - Next topic

s1n

i am new to code blocks and i am trying to right a simple hello world program but when i go to build it i get this

error: 'system' was not declared in this scope   

dose anyone know how i can fix this

s1n

sorry i forgot to tell about my system i am running a eee pc i forget the modle number
my os is kubuntu 10.04

thanks for any help you may have

Okaya

Hi s1n,

It would help if you can post your program's code here.


Regards,

Okaya


stahta01

Quote from: zoogenic on May 18, 2010, 06:10:21 PM
Just
#include <stdlib.h>

The first Google result said to install and use GCC G++ command.
First Guess based on that info
1. Install GCC G++
2. Try changing file extension to .cpp

Second guess you are doing an C project with cpp extension
1. Change to use .c extension (lower case c) in C projects.


Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Hans Henrik

ahh.. why doesn't he get a "where the heck is main" error?