The new Release 20.03 is out! You can download binaries for Windows and many major Linux distros here .
#include <iostream>#include <iomanip>using namespace std;void Seive( int test, int *ar, int bound );int main(){ int x=5; cout<<x; cout << "Input the largest number to get the primes:" << endl; int limit = 0; cin >> limit; int bound = limit + 1; int array[bound]; for ( int i = 0;i < bound;++i ) { array[i] = 1; } array[0] = array[1] = 0; Seive( 2, array, bound ); Seive( 3, array, bound ); Seive( 5, array, bound ); Seive( 7, array, bound ); cout << "PRIME NUMBERS" << endl; int p = 0 ; for ( int i = 0; i < bound;++i ) { if ( array[i] != 0 ) { cout << setw( 5 ) << i << " "; ++p; if ( !( p % 4 ) ) { cout << endl; } } } return 0;}void Seive( int test, int *ar, int bound ){ int mod = 0; for ( int i = 0;i < bound;++i ) { mod = i % test; if ( mod == 0 && i != test ) { ar[i] = 0; } }}
(no debugging symbols found)(no debugging symbols found)(no debugging symbols found)(no debugging symbols found)
i followed the instruction STEP BY STEP so yes i check the generate debbuging symbols..or something like that
Quote from: Skeezix on April 11, 2008, 04:22:05 pmi followed the instruction STEP BY STEP so yes i check the generate debbuging symbols..or something like thatMake sure that (in addition) you *don't* have stripping symbols (-s) and any optimisation enabled(-O1... -On). Otherwise please post a minimal example project here for us to try.
I tried your project, worked perfectly (on OpenSuse 10.2).Your project file looks OK, so those settings are ok.Could you post the full building log.To see this do : Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"and then do rebuild all and paste the build log.
mingw32-g++.exe -Wall -g -fexceptions -g -O1 -O -g -c "C:\IDEandCompilers\CodeBlocks\PROJS\Sieve of Eratosthenes\main.cpp" -o obj\Debug\main.omingw32-g++.exe -o "bin\Debug\Sieve of Eratosthenes.exe" obj\Debug\main.o -s Output size is 270.50 KBProcess terminated with status 0 (0 minutes, 1 seconds)0 errors, 0 warnings
Building to ensure sources are up-to-dateBuild succeededSelecting target: DebugAdding source dir: C:\IDEandCompilers\CodeBlocks\PROJS\Sieve of Eratosthenes\Adding source dir: C:\IDEandCompilers\CodeBlocks\PROJS\Sieve of Eratosthenes\Adding file: bin\Debug\Sieve of Eratosthenes.exeStarting debugger: doneRegistered new type: wxStringRegistered new type: STL StringRegistered new type: STL VectorSetting breakpoints(no debugging symbols found)Debugger name and version: GNU gdb 6.7.50.20071127No symbol table is loaded. Use the "file" command.Child process PID: 3552(no debugging symbols found)(no debugging symbols found)(no debugging symbols found)(no debugging symbols found)Program exited normally.Debugger finished with status 0
Building Log:Quotemingw32-g++.exe -Wall -g -fexceptions -g -O1 -O -g -c "C:\IDEandCompilers\CodeBlocks\PROJS\Sieve of Eratosthenes\main.cpp" -o obj\Debug\main.omingw32-g++.exe -o "bin\Debug\Sieve of Eratosthenes.exe" obj\Debug\main.o -s Output size is 270.50 KBProcess terminated with status 0 (0 minutes, 1 seconds)0 errors, 0 warnings
how do i turn it off...i already did the Project->Build Options->Compiler settings thing