A
Alex Vinokur
What is wrong in program below?
--- foo.cpp ---
struct Foo {};
int main ()
{
Foo foo1, foo2;
for (int i = 0, foo1 = foo2; ; ); // Line#5
return 0;
}
---------------
--- Compilation ---
// GNU gcc/gpp 3.4.1
$ gpp foo.cpp
foo.cpp: In function `int main()':
foo.cpp:5: error: cannot convert `Foo' to `int' in initialization
-------------------
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
--- foo.cpp ---
struct Foo {};
int main ()
{
Foo foo1, foo2;
for (int i = 0, foo1 = foo2; ; ); // Line#5
return 0;
}
---------------
--- Compilation ---
// GNU gcc/gpp 3.4.1
$ gpp foo.cpp
foo.cpp: In function `int main()':
foo.cpp:5: error: cannot convert `Foo' to `int' in initialization
-------------------
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn