Site icon

Generate C++ code from Raptor Flowchart


We can generate C++ source code from Raptor flowchart in many languages like C++, Java, VBA, etc. Let’s see how to generate code for a sample flow chart to add two integers.




Novice & Intermediate Mode:
In these modes, we can generate code in the following programming languages.


Object-Oriented mode

In Object-oriented mode, we can only generate code in Java language. To know the modes in Raptor Tool


Steps to generate code from Raptor flowchart in your favorite language that Raptor supports are as follows:



You may execute the flowchart and confirm that it’s working as per the design.

C++ Code generation

Click Generate Menu.
Go to menu Generate and choose a programming language example: C++



A source code file would be generated and automatically opened by default application.
For example, Code:: Blocks IDE is default IDE application for C++ programs on the system.

We may notice that the declaration statement starts with ??. We need to add the data types for the variables in the generated code. Remove all the question mark symbols and add appropriate datatypes for the variables.


Code in C++


#include <iostream>

#include <string>

using namespace std;

int main()

 string raptor_prompt_variable_zzyz;

 ?? a;

 ?? b;

 ?? sum;

sum =0;

 raptor_prompt_variable_zzyz ="Enter a";

 cout << raptor_prompt_variable_zzyz << endl;

 cin >> a;

 raptor_prompt_variable_zzyz ="Enter b";

 cout << raptor_prompt_variable_zzyz << endl;

 cin >> b;

 sum =a+b;

 cout << "Sum of a + b="+sum << endl;

 return 0;




Generate Java Code from Raptor Flowchart:

Raptor Tutorials on this website can be found at:

RAPTOR official website:

Exit mobile version