User forums > Help

error: ‘system’ was not declared in this scope

(1/2) > >>

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

zoogenic:
Just
#include <stdlib.h>

stahta01:

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

--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

Go to full version