P: 1 | Can anybody help me understand what i'm doing wrong or what I'm missing? Is there anyother good and commendable C++ program I can use (free) from the internet like Dev C++? I'm having trouble doing basic compiling on this new Dev C++, when i try to print something like: #include<iostream.h> using namespace std; int main () { cout << 'Hello to the world' << endl; system('PAUSE') return 0; } It doesnt let me, it gives me these errors: Compiler: Default compiler Executing g++.exe. g++.exe 'C:Documents and SettingsAndre MarinDesktopUntitled1.cpp' -o 'C:Documents and SettingsAndre MarinDesktopUntitled1.exe' -I'C:Dev-Cppincludec++' -I'C:Dev-Cppinclude' -L'C:Dev-Cpplib' C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:1:21: error: iostream.h: No such file or directory C:Documents and SettingsAndre MarinDesktopUntitled1.cpp: In function 'int main()': C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:6: error: 'cout' was not declared in this scope C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:6: error: 'endl' was not declared in this scope C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:7: error: 'system' was not declared in this scope C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:8: error: expected `;' before 'return' Execution terminated And then when I try to do this compiling: #include<iostream> using namespace std; int main () { cout << 'Hello to the world' << endl; system('PAUSE') return 0; } It gives me about a hundred errors: Compiler: Default compiler Executing g++.exe. g++.exe 'C:Documents and SettingsAndre MarinDesktopUntitled1.cpp' -o 'C:Documents and SettingsAndre MarinDesktopUntitled1.exe' -I'C:Dev-Cppincludec++' -I'C:Dev-Cppinclude' -L'C:Dev-Cpplib' In file included from C:/Dev-Cpp/include/c++/iosfwd:46, from C:/Dev-Cpp/include/c++/ios:44, from C:/Dev-Cpp/include/c++/ostream:45, from C:/Dev-Cpp/include/c++/iostream:45, from C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:1: C:/Dev-Cpp/include/c++/bits/fpos.h:6: error: missing terminating ' character In file included from C:/Dev-Cpp/include/c++/bits/char_traits.h:46, from C:/Dev-Cpp/include/c++/ios:46, from C:/Dev-Cpp/include/c++/ostream:45, from C:/Dev-Cpp/include/c++/iostream:45, from C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:1: C:/Dev-Cpp/include/c++/bits/fpos.h:6: error: missing terminating ' character In file included from C:/Dev-Cpp/include/c++/istream:45, from C:/Dev-Cpp/include/c++/iostream:46, from C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:1: C:/Dev-Cpp/include/c++/limits:48:29: error: bits/cpu_limits.h: No such file or directory C:/Dev-Cpp/include/c++/bits/fpos.h: In function 'int main()': C:/Dev-Cpp/include/c++/bits/fpos.h:6: error: 'cout' was not declared in this scope C:/Dev-Cpp/include/c++/bits/fpos.h:7: error: 'system' was not declared in this scope C:/Dev-Cpp/include/c++/bits/fpos.h:8: error: expected `;' before 'return' C:/Dev-Cpp/include/c++/bits/fpos.h: In function 'int main()': C:/Dev-Cpp/include/c++/bits/fpos.h:4: error: redefinition of 'int main()' C:/Dev-Cpp/include/c++/bits/fpos.h:4: error: 'int main()' previously defined here C:/Dev-Cpp/include/c++/bits/fpos.h:6: error: 'cout' was not declared in this scope C:/Dev-Cpp/include/c++/bits/fpos.h:7: error: 'system' was not declared in this scope C:/Dev-Cpp/include/c++/bits/fpos.h:8: error: expected `;' before 'return' C:/Dev-Cpp/include/c++/bits/char_traits.h: At global scope: C:/Dev-Cpp/include/c++/bits/char_traits.h:59: error: 'streampos' does not name a type C:/Dev-Cpp/include/c++/bits/char_traits.h:60: error: 'streamoff' does not name a type C:/Dev-Cpp/include/c++/bits/char_traits.h:61: error: 'mbstate_t' does not name a type C:/Dev-Cpp/include/c++/bits/char_traits.h:113: error: 'streampos' does not name a type C:/Dev-Cpp/include/c++/bits/char_traits.h:114: error: 'streamoff' does not name a type C:/Dev-Cpp/include/c++/bits/char_traits.h:115: error: 'mbstate_t' does not name a type C:/Dev-Cpp/include/c++/bits/char_traits.h: In static member function 'static int std::char_traits<char>::eof()': C:/Dev-Cpp/include/c++/bits/char_traits.h:168: error: 'EOF' was not declared in this scope C:/Dev-Cpp/include/bits/c++locale.h: In function 'int std::__convert_from_v(char*, int, const char*, _Tv, int* const&, int)': C:/Dev-Cpp/include/bits/c++locale.h:72: error: 'snprintf' is not a member of 'std' C:/Dev-Cpp/include/c++/bits/basic_string.h: In member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_dispose(const _Alloc&)': C:/Dev-Cpp/include/c++/bits/basic_string.h:186: error: there are no arguments to '__exchange_and_add' that depend on a template parameter, so a declaration of '__exchange_and_add' must be available C:/Dev-Cpp/include/c++/bits/basic_string.h:186: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) C:/Dev-Cpp/include/c++/bits/basic_string.h: In member function '_CharT* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_refcopy()': C:/Dev-Cpp/include/c++/bits/basic_string.h:196: error: there are no arguments to '__atomic_add' that depend on a template parameter, so a declaration of '__atomic_add' must be available C:/Dev-Cpp/include/c++/bits/localefwd.h: At global scope: C:/Dev-Cpp/include/c++/bits/localefwd.h:128: error: 'mbstate_t' was not declared in this scope C:/Dev-Cpp/include/c++/bits/localefwd.h:128: error: template argument 3 is invalid C:/Dev-Cpp/include/c++/bits/localefwd.h: In member function 'void std::locale::_Impl::_M_add_reference()': C:/Dev-Cpp/include/c++/bits/localefwd.h:322: error: '__atomic_add' was not declared in this scope C:/Dev-Cpp/include/c++/bits/localefwd.h: In member function 'void std::locale::_Impl::_M_remove_reference()': C:/Dev-Cpp/include/c++/bits/localefwd.h:327: error: '__exchange_and_add' was not declared in this scope C:/Dev-Cpp/include/c++/bits/localefwd.h: In member function 'size_t std::locale::id::_M_id() const': C:/Dev-Cpp/include/c++/bits/localefwd.h:462: error: '__exchange_and_add' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h: At global scope: C:/Dev-Cpp/include/c++/bits/ios_base.h:178: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:179: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:180: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:181: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:182: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:183: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:184: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:185: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:186: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:187: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:188: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:189: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:190: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:191: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:192: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:193: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:194: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:195: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:199: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:200: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:201: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:206: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:207: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:208: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:209: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:210: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:211: error: '__ios_flags' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h:240: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/ios_base.h:241: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/ios_base.h:360: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/ios_base.h:363: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/ios_base.h:371: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/ios_base.h:374: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/ios_base.h: In member function 'void std::ios_base::_Callback_list::_M_add_reference()' : C:/Dev-Cpp/include/c++/bits/ios_base.h:261: error: '__atomic_add' was not declared in this scope C:/Dev-Cpp/include/c++/bits/ios_base.h: In member function 'int std::ios_base::_Callback_list::_M_remove_reference ()': C:/Dev-Cpp/include/c++/bits/ios_base.h:265: error: '__exchange_and_add' was not declared in this scope C:/Dev-Cpp/include/c++/streambuf: At global scope: C:/Dev-Cpp/include/c++/streambuf:55: error: expected constructor, destructor, or type conversion before '__copy_streambufs' C:/Dev-Cpp/include/c++/streambuf:82: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/streambuf:137: error: expected ';' before '<' token C:/Dev-Cpp/include/c++/streambuf:269: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/streambuf:287: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/streambuf:329: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/streambuf:344: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/streambuf:415: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/streambuf:432: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/streambuf:435: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/streambuf:464: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/bits/codecvt.h:213: error: 'mbstate_t' was not declared in this scope C:/Dev-Cpp/include/c++/bits/codecvt.h:213: error: template argument 3 is invalid C:/Dev-Cpp/include/c++/bits/codecvt.h:214: error: 'mbstate_t' was not declared in this scope C:/Dev-Cpp/include/c++/bits/codecvt.h:214: error: template argument 3 is invalid C:/Dev-Cpp/include/c++/bits/locale_facets.h:448: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/bits/locale_facets.h: In constructor 'std::numpunct_byname<_CharT>::numpunct_byname(con st char*, size_t)': C:/Dev-Cpp/include/c++/bits/locale_facets.h:564: error: there are no arguments to '_S_create_c_locale' that depend on a template parameter, so a declaration of '_S_create_c_locale' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h:565: error: there are no arguments to '_M_initialize_numpunct' that depend on a template parameter, so a declaration of '_M_initialize_numpunct' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h: In destructor 'virtual std::numpunct_byname<_CharT>::~numpunct_byname()': C:/Dev-Cpp/include/c++/bits/locale_facets.h:571: error: there are no arguments to '_S_destroy_c_locale' that depend on a template parameter, so a declaration of '_S_destroy_c_locale' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h: In constructor 'std::collate_byname<_CharT>::collate_byname(const char*, size_t)': C:/Dev-Cpp/include/c++/bits/locale_facets.h:928: error: '_M_c_locale_collate' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:928: error: '_S_c_locale' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:929: error: there are no arguments to '_S_destroy_c_locale' that depend on a template parameter, so a declaration of '_S_destroy_c_locale' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h:930: error: '_M_c_locale_collate' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:930: error: there are no arguments to '_S_create_c_locale' that depend on a template parameter, so a declaration of '_S_create_c_locale' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h: In constructor 'std::moneypunct_byname<_CharT, _Intl>::moneypunct_byname(const char*, size_t)': C:/Dev-Cpp/include/c++/bits/locale_facets.h:1520: error: there are no arguments to '_S_create_c_locale' that depend on a template parameter, so a declaration of '_S_create_c_locale' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h:1521: error: there are no arguments to '_M_initialize_moneypunct' that depend on a template parameter, so a declaration of '_M_initialize_moneypunct' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h: In destructor 'virtual std::moneypunct_byname<_CharT, _Intl>::~moneypunct_byname()': C:/Dev-Cpp/include/c++/bits/locale_facets.h:1527: error: there are no arguments to '_S_destroy_c_locale' that depend on a template parameter, so a declaration of '_S_destroy_c_locale' must be available C:/Dev-Cpp/include/bits/messages_members.h: At global scope: C:/Dev-Cpp/include/bits/messages_members.h:38: error: redefinition of 'std::messages<_CharT>::messages(size_t)' C:/Dev-Cpp/include/c++/bits/locale_facets.h:1639: error: 'std::messages<_CharT>::messages(size_t)' previously declared here C:/Dev-Cpp/include/bits/messages_members.h: In constructor 'std::messages<_CharT>::messages(size_t)': C:/Dev-Cpp/include/bits/messages_members.h:40: error: there are no arguments to '_S_get_c_locale' that depend on a template parameter, so a declaration of '_S_get_c_locale' must be available C:/Dev-Cpp/include/bits/messages_members.h: At global scope: C:/Dev-Cpp/include/bits/messages_members.h:43: error: redefinition of 'std::messages<_CharT>::messages(int*, const char*, size_t)' C:/Dev-Cpp/include/c++/bits/locale_facets.h:1645: error: 'std::messages<_CharT>::messages(int*, const char*, size_t)' previously declared here C:/Dev-Cpp/include/bits/messages_members.h: In constructor 'std::messages<_CharT>::messages(int*, const char*, size_t)': C:/Dev-Cpp/include/bits/messages_members.h:45: error: there are no arguments to '_S_get_c_locale' that depend on a template parameter, so a declaration of '_S_get_c_locale' must be available C:/Dev-Cpp/include/bits/messages_members.h: At global scope: C:/Dev-Cpp/include/bits/messages_members.h:55: error: redefinition of 'std::messages<_CharT>::~messages()' C:/Dev-Cpp/include/c++/bits/locale_facets.h:1670: error: 'virtual std::messages<_CharT>::~messages()' previously declared here C:/Dev-Cpp/include/bits/messages_members.h:76: error: invalid use of undefined type 'struct std::messages_byname<_CharT>' C:/Dev-Cpp/include/c++/bits/localefwd.h:176: error: declaration of 'struct std::messages_byname<_CharT>' C:/Dev-Cpp/include/bits/messages_members.h:76: error: template definition of non-template 'std::messages_byname<_CharT>::messages_byname(con st char*, size_t)' C:/Dev-Cpp/include/c++/bits/locale_facets.h: In constructor 'std::messages_byname<_CharT>::messages_byname(con st char*, size_t)': C:/Dev-Cpp/include/c++/bits/locale_facets.h:1756: error: '_M_name_messages' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:1757: error: '_M_c_locale_messages' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:1757: error: '_S_c_locale' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:1758: error: there are no arguments to '_S_destroy_c_locale' that depend on a template parameter, so a declaration of '_S_destroy_c_locale' must be available C:/Dev-Cpp/include/c++/bits/locale_facets.h:1759: error: '_M_c_locale_messages' was not declared in this scope C:/Dev-Cpp/include/c++/bits/locale_facets.h:1759: error: there are no arguments to '_S_create_c_locale' that depend on a template parameter, so a declaration of '_S_create_c_locale' must be available C:/Dev-Cpp/include/c++/ostream: At global scope: C:/Dev-Cpp/include/c++/ostream:161: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/istream:71: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/istream:147: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/istream:158: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/istream:161: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/istream:172: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/istream:175: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/istream:179: error: expected ';' before '(' token C:/Dev-Cpp/include/c++/istream:185: error: 'streamsize' has not been declared C:/Dev-Cpp/include/c++/istream:187: error: 'streamsize' does not name a type C:/Dev-Cpp/include/c++/istream: In constructor 'std::basic_istream<_CharT, _Traits>::basic_istream(std::basic_streambuf<_Char T, _Traits>*)': C:/Dev-Cpp/include/c++/istream:79: error: '_M_gcount' was not declared in this scope C:/Dev-Cpp/include/c++/istream:79: error: there are no arguments to 'streamsize' that depend on a template parameter, so a declaration of 'streamsize' must be available C:/Dev-Cpp/include/c++/istream: In destructor 'virtual std::basic_istream<_CharT, _Traits>::~basic_istream()': C:/Dev-Cpp/include/c++/istream:84: error: '_M_gcount' was not declared in this scope C:/Dev-Cpp/include/c++/istream:84: error: there are no arguments to 'streamsize' that depend on a template parameter, so a declaration of 'streamsize' must be available C:Documents and SettingsAndre MarinDesktopUntitled1.cpp: In function 'int main()': C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:4: error: redefinition of 'int main()' C:/Dev-Cpp/include/c++/bits/fpos.h:4: error: 'int main()' previously defined here C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:4: error: redefinition of 'int main()' C:/Dev-Cpp/include/c++/bits/fpos.h:4: error: 'int main()' previously defined here C:/Dev-Cpp/include/c++/bits/basic_ios.h: At global scope: C:/Dev-Cpp/include/c++/bits/basic_ios.h: In instantiation of 'std::basic_ios<char, std::char_traits<char> >': C:/Dev-Cpp/include/c++/iosfwd:61: instantiated from 'std::basic_ostream<char, std::char_traits<char> >' C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:6: instantiated from here C:/Dev-Cpp/include/c++/bits/basic_ios.h:53: error: no type named 'pos_type' in 'struct std::char_traits<char>' C:/Dev-Cpp/include/c++/bits/basic_ios.h:54: error: no type named 'off_type' in 'struct std::char_traits<char>' C:/Dev-Cpp/include/c++/ostream: In instantiation of 'std::basic_ostream<char, std::char_traits<char> >': C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:6: instantiated from here C:/Dev-Cpp/include/c++/ostream:57: error: no type named 'pos_type' in 'struct std::char_traits<char>' C:/Dev-Cpp/include/c++/ostream:58: error: no type named 'off_type' in 'struct std::char_traits<char>' C:/Dev-Cpp/include/c++/ostream:168: error: no type named 'pos_type' in 'struct std::char_traits<char>' C:/Dev-Cpp/include/c++/ostream:171: error: no type named 'pos_type' in 'struct std::char_traits<char>' C:/Dev-Cpp/include/c++/ostream:174: error: no type named 'off_type' in 'struct std::char_traits<char>' C:Documents and SettingsAndre MarinDesktopUntitled1.cpp: In function 'int main()': C:Documents and SettingsAndre MarinDesktopUntitled1.cpp:8: error: expected `;' before 'return' Execution terminated what is going on, what can I do, how can i change it, can i substitute this with any other good C++ software or programs? i'm relatively new at this and need this kind of program for my class. thank you |