Product Documentation

Building a Microsoft Visual Studio C++ Project for Your c-tree Application

Previous Topic

Next Topic

Step 2 - Copy some test code into the .cpp file

For testing (which will be done in step 6), copy the following block of code into your new .cpp file, under the #include "pch.h" line (or the #include "stdafx.h" line):

#include "ctdbsdk.hpp" // c-tree headers

int main (int argc, char * argv[])

{

CTDBRET retval = ctdbStartDatabaseEngine();

return(0);

}

Note that the #include "pch.h" line (or the #include "stdafx.h" line, which Visual Studio put in), must remain, and be the first compiled line of code in the .cpp file. Only comments and white space are allowed above it.

TOCIndex