Hi,
I need to output the results from my program into a pdf file, but I'm not sure how. Are there any easy to use libraries to do this ? And could you post step by step on how to use the library ?
For example, how would I get the exact same output that this test program prints, but into a pdf file format ?
Thanks,
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
int num = 1000;
string a = "Test word";
int number[] = { 1, 3, 4, 5, 6, };
string words[] = { word1, word2, word3 };
cout << "Sample formatting for output. " << endl;
cout << "\tTest indent/tab" << endl;
cout << "\tTest indent/tab" << endl;
cout << "\t\tTest indent/tab" << endl;
cout << "\t\tTest indent/tab" << endl;
cout << "\t\t\tTest indent/tab" << endl;
cout << "\t\t\tTest indent/tab" << endl;
cout << "Values in array number: "
for ( int i = 0; i < (sizeof(number) / sizeof(int) ); i++ )
{
cout << number[i] << " ";
}
cout << "Words in array words: "
for ( int i = 0; i < (sizeof(words) / sizeof(string) ); i++ )
{
cout << number[i] << " ";
}
return 0;
}