2011年3月14日 星期一

Common C++ compile issues

Cannot open include file: 'iostream.h': No such file or directory".
FIX: Use following instead.

#include <iostream>

`cout' undeclared
FIX: add following line
using namespace std;

error: ‘strcmp’ was not declared in this scope
FIX: Add following line
#include <cstring>



iostream.h problem
http://bytes.com/topic/c/answers/516995-iostream-h-problem

Fixing the strcmp was not declared in this scope error
http://shiroikuma.com/index.php?cmd=%E7%9B%B8%E6%92%B2%E5%A4%96%EF%BC%9AFixing%20the%20strcmp%20was%20not%20declared%20in%20this%20scope%20error&PHPSESSID=d7d1db712ea0fc6751af41d61629edb1

GCC 4.3 related build problems: missing #include
http://www.cyrius.com/journal/2007/05/10#gcc-4.3-include
Functions and defines Header
find, for_each, sort algorithm
isalnum, toupper cctype
INT_MIN, RAND_MAX climits
printf cstdio
atoi, free, rand cstdlib
EXIT_FAILURE cstdlib
strcmp, memcpy cstring
auto_ptr memory
fd_set, mode_t sys/types.h
typeid typeinfo

沒有留言: