Hi there,
I am trying to compile a simple C++ program with gcc and i get the error:
Look at output.txt file below... could not paste output... too many faces what so ever...
I compiled it on another machine with gcc and it works well...
i have the build-essential package installed aswell...?
it probably is a simple mistake... here is the program... i am starting to learn to program in C++
Code:
// increaser.. using Void!
#include <iostream>
using namespace std;
void increase (void* data, int size)
{
switch (size)
{
case sizeof(char) : (*((char*)data))++; break;
case sizeof(int) : (*((int*)data))++; break;
}
}
int main ()
{
char a = 'x';
int b = 1602;
increase (&a,sizeof(a));
increase (&b,sizeof(b));
cout << a << ", " << b << endl;
return 0;
Bookmarks