small class program

#include "stdafx.h"
#include <iostream>
using namespace std;

class test
{

public:
int data1;
float data2;
public:
void function1()
{
data1 = 2;
}
float function2()
{
data2 = 3.5;
return data2;
}

};

int main()
{
function1();

return 0;
}

can anyone one explain how to get a output from this program?
What kind of output do you want?

Maybe something like:

1
2
3
4
5
6
7
#include <iostream>

int main()
{
    std::cout << "Hello World\n";
    return 0;
}


Topic archived. No new replies allowed.