Function failure

From RAD Studio
Jump to: navigation, search

Go Up to Function Failure Errors

CodeGuard monitors the return value of many of the standard C++Builder or Wind32 API functions. A return value of -1 indicates that an error occurred when the function was called and will be logged by CodeGuard. See the following code sample using chdir() with an invalid directory name:

#include <tchar.h>
#pragma hdrstop
void myf()
	chdir("z:\zxbvn"); //error

int _tmain(int argc, _TCHAR* argv[])
	return 0;