Warnings in FILE input code
Code:
#include <iostream>
#include <fstream>
#include <list>
using namespace std;
int main()
{
int no_of_vertices;
ifstream fin;
fin.open("RECTANGLE_GRAPH.txt",ios::in);
if( !fin )
{
cout << "File not found!" << endl;
return 1;
}
fin >> no_of_vertices;
return 0;
}
Code:
/usr/include/c++/4.4/fstream||In constructor ‘std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT = char, _Traits = std::char_traits<char>]’:|
/usr/include/c++/4.4/fstream|440|warning: will never be executed|
/usr/include/c++/4.4/fstream|440|warning: will never be executed|
/usr/include/c++/4.4/fstream|440|warning: will never be executed|
/usr/include/c++/4.4/fstream|440|warning: will never be executed|
/usr/include/c++/4.4/fstream|441|warning: will never be executed|
/usr/include/c++/4.4/fstream|441|warning: will never be executed|
/usr/include/c++/4.4/bits/basic_ios.h||In constructor ‘std::basic_ios<_CharT, _Traits>::basic_ios() [with _CharT = char, _Traits = std::char_traits<char>]’:|
/usr/include/c++/4.4/bits/basic_ios.h|453|warning: will never be executed|
/usr/include/c++/4.4/istream||In constructor ‘std::basic_istream<_CharT, _Traits>::basic_istream() [with _CharT = char, _Traits = std::char_traits<char>]’:|
/usr/include/c++/4.4/istream|582|warning: will never be executed|
/usr/include/c++/4.4/istream|582|warning: will never be executed|
/usr/include/c++/4.4/istream|582|warning: will never be executed|
/usr/include/c++/4.4/istream|582|warning: will never be executed|
/usr/include/c++/4.4/istream|583|warning: will never be executed|
/usr/include/c++/4.4/istream|583|warning: will never be executed|
/usr/include/c++/4.4/istream||In destructor ‘std::basic_istream<_CharT, _Traits>::~basic_istream() [with _CharT = char, _Traits = std::char_traits<char>]’:|
/usr/include/c++/4.4/istream|102|warning: will never be executed|
/usr/include/c++/4.4/istream|102|warning: will never be executed|
/usr/include/c++/4.4/istream|102|warning: will never be executed|
/usr/include/c++/4.4/fstream||In destructor ‘std::basic_ifstream<_CharT, _Traits>::~basic_ifstream() [with _CharT = char, _Traits = std::char_traits<char>]’:|
/usr/include/c++/4.4/fstream|486|warning: will never be executed|
/usr/include/c++/4.4/fstream|486|warning: will never be executed|
/usr/include/c++/4.4/fstream|486|warning: will never be executed|
/usr/include/c++/4.4/fstream|486|warning: will never be executed|
/usr/include/c++/4.4/fstream|486|warning: will never be executed|
||=== Build finished: 0 errors, 21 warnings ===|
Using CODE BLOCKS 10.05 in UBUNTU 10.10. Any help please?