Getting Started Coding
From FarsightWiki
Contents |
Learning Farsight
SVN
CMake
ITK
Learning Coding
The basis of Farsight is the C++ libraries used.
Places to find documentation and example code:
- Boost
- Build graph networks
- ITK
- Image Segmentation and Analysis
- Example code
- QT
- GUI support
- Model-View Architecture
- Examples
- VXL
- Numeric library
- VTK
- CPlusPlus.com
- A good source for C++ documentation
- Back to developers tools
A Simple Main Function
//first include some source classes #include "SomeReaderClass.h" #include "SomeWriterClass.h" //main function takes in arguments from the command line int main(int argc, char **argv ) { // argc is a int to tell you how many input arguments were included. // argv is a char pointer pointer of the input arguments. for ( int i = 0; i < argc; i++) { // starting from 0, the index variable "i" will increase until it is argc -1 // c++ counts from 0, so index array[2] is a the third place in array {0,1,2} std::cout <<"argument at" << i << " is " <<argv[i] << std::endl; // this loop will print out the arguments including the .exe name } return 0; //the main function exits }