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<iostre am.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:\Documen ts and Settings\Andre Marin\Desktop\U ntitled1.cpp" -o "C:\Documen ts and Settings\Andre Marin\Desktop\U ntitled1.exe" -I"C:\Dev-Cpp\include\c++ " -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp:1: 21: error: iostream.h: No such file or directory
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp: In function 'int main()':
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp:6: error: 'cout' was not declared in this scope
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp:6: error: 'endl' was not declared in this scope
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp:7: error: 'system' was not declared in this scope
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp:8: error: expected `;' before 'return'
Execution terminated
And then when I try to do this compiling:
#include<iostre am>
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:\Documen ts and Settings\Andre Marin\Desktop\U ntitled1.cpp" -o "C:\Documen ts and Settings\Andre Marin\Desktop\U ntitled1.exe" -I"C:\Dev-Cpp\include\c++ " -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
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 Settings\Andre Marin\Desktop\U ntitled1.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:4 6,
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 Settings\Andre Marin\Desktop\U ntitled1.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 Settings\Andre Marin\Desktop\U ntitled1.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:5 9: error: 'streampos' does not name a type
C:/Dev-Cpp/include/c++/bits/char_traits.h:6 0: error: 'streamoff' does not name a type
C:/Dev-Cpp/include/c++/bits/char_traits.h:6 1: error: 'mbstate_t' does not name a type
C:/Dev-Cpp/include/c++/bits/char_traits.h:1 13: error: 'streampos' does not name a type
C:/Dev-Cpp/include/c++/bits/char_traits.h:1 14: error: 'streamoff' does not name a type
C:/Dev-Cpp/include/c++/bits/char_traits.h:1 15: 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_trait s<char>::eof()' :
C:/Dev-Cpp/include/c++/bits/char_traits.h:1 68: 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_stri ng<_CharT, _Traits, _Alloc>::_Rep:: _M_dispose(cons t _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_stri ng<_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::_I mpl::_M_add_ref erence()':
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::_I mpl::_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_referen ce()':
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_refe rence()':
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_streamb ufs'
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_bynam e(const char*, size_t)':
C:/Dev-Cpp/include/c++/bits/locale_facets.h :564: error: there are no arguments to '_S_create_c_lo cale' that depend on a template parameter, so a declaration of '_S_create_c_lo cale' 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_b yname<_CharT>:: ~numpunct_bynam e()':
C:/Dev-Cpp/include/c++/bits/locale_facets.h :571: error: there are no arguments to '_S_destroy_c_l ocale' that depend on a template parameter, so a declaration of '_S_destroy_c_l ocale' must be available
C:/Dev-Cpp/include/c++/bits/locale_facets.h : In constructor 'std::collate_b yname<_CharT>:: collate_byname( const char*, size_t)':
C:/Dev-Cpp/include/c++/bits/locale_facets.h :928: error: '_M_c_locale_co llate' 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_l ocale' that depend on a template parameter, so a declaration of '_S_destroy_c_l ocale' must be available
C:/Dev-Cpp/include/c++/bits/locale_facets.h :930: error: '_M_c_locale_co llate' 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_lo cale' that depend on a template parameter, so a declaration of '_S_create_c_lo cale' must be available
C:/Dev-Cpp/include/c++/bits/locale_facets.h : In constructor 'std::moneypunc t_byname<_CharT , _Intl>::moneypu nct_byname(cons t char*, size_t)':
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1520: error: there are no arguments to '_S_create_c_lo cale' that depend on a template parameter, so a declaration of '_S_create_c_lo cale' 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>::~moneyp unct_byname()':
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1527: error: there are no arguments to '_S_destroy_c_l ocale' that depend on a template parameter, so a declaration of '_S_destroy_c_l ocale' must be available
C:/Dev-Cpp/include/bits/messages_member s.h: At global scope:
C:/Dev-Cpp/include/bits/messages_member s.h:38: error: redefinition of 'std::messages< _CharT>::messag es(size_t)'
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1639: error: 'std::messages< _CharT>::messag es(size_t)' previously declared here
C:/Dev-Cpp/include/bits/messages_member s.h: In constructor 'std::messages< _CharT>::messag es(size_t)':
C:/Dev-Cpp/include/bits/messages_member s.h:40: error: there are no arguments to '_S_get_c_local e' that depend on a template parameter, so a declaration of '_S_get_c_local e' must be available
C:/Dev-Cpp/include/bits/messages_member s.h: At global scope:
C:/Dev-Cpp/include/bits/messages_member s.h:43: error: redefinition of 'std::messages< _CharT>::messag es(int*, const char*, size_t)'
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1645: error: 'std::messages< _CharT>::messag es(int*, const char*, size_t)' previously declared here
C:/Dev-Cpp/include/bits/messages_member s.h: In constructor 'std::messages< _CharT>::messag es(int*, const char*, size_t)':
C:/Dev-Cpp/include/bits/messages_member s.h:45: error: there are no arguments to '_S_get_c_local e' that depend on a template parameter, so a declaration of '_S_get_c_local e' must be available
C:/Dev-Cpp/include/bits/messages_member s.h: At global scope:
C:/Dev-Cpp/include/bits/messages_member s.h:55: error: redefinition of 'std::messages< _CharT>::~messa ges()'
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1670: error: 'virtual std::messages<_ CharT>::~messag es()' previously declared here
C:/Dev-Cpp/include/bits/messages_member s.h:76: error: invalid use of undefined type 'struct std::messages_b yname<_CharT>'
C:/Dev-Cpp/include/c++/bits/localefwd.h:176 : error: declaration of 'struct std::messages_b yname<_CharT>'
C:/Dev-Cpp/include/bits/messages_member s.h:76: error: template definition of non-template 'std::messages_ byname<_CharT>: :messages_bynam e(const char*, size_t)'
C:/Dev-Cpp/include/c++/bits/locale_facets.h : In constructor 'std::messages_ byname<_CharT>: :messages_bynam e(const char*, size_t)':
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1756: error: '_M_name_messag es' was not declared in this scope
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1757: error: '_M_c_locale_me ssages' 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_l ocale' that depend on a template parameter, so a declaration of '_S_destroy_c_l ocale' must be available
C:/Dev-Cpp/include/c++/bits/locale_facets.h :1759: error: '_M_c_locale_me ssages' 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_lo cale' that depend on a template parameter, so a declaration of '_S_create_c_lo cale' 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_ist ream<_CharT, _Traits>::basic _istream(std::b asic_streambuf< _CharT, _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_istr eam<_CharT, _Traits>::~basi c_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 Settings\Andre Marin\Desktop\U ntitled1.cpp: In function 'int main()':
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.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 Settings\Andre Marin\Desktop\U ntitled1.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_trait s<char> >':
C:/Dev-Cpp/include/c++/iosfwd:61: instantiated from 'std::basic_ost ream<char, std::char_trait s<char> >'
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.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_trait s<char>'
C:/Dev-Cpp/include/c++/bits/basic_ios.h:54: error: no type named 'off_type' in 'struct std::char_trait s<char>'
C:/Dev-Cpp/include/c++/ostream: In instantiation of 'std::basic_ost ream<char, std::char_trait s<char> >':
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp:6: instantiated from here
C:/Dev-Cpp/include/c++/ostream:57: error: no type named 'pos_type' in 'struct std::char_trait s<char>'
C:/Dev-Cpp/include/c++/ostream:58: error: no type named 'off_type' in 'struct std::char_trait s<char>'
C:/Dev-Cpp/include/c++/ostream:168: error: no type named 'pos_type' in 'struct std::char_trait s<char>'
C:/Dev-Cpp/include/c++/ostream:171: error: no type named 'pos_type' in 'struct std::char_trait s<char>'
C:/Dev-Cpp/include/c++/ostream:174: error: no type named 'off_type' in 'struct std::char_trait s<char>'
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.cpp: In function 'int main()':
C:\Documents and Settings\Andre Marin\Desktop\U ntitled1.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