>So whats wrong with my print function?
It uses other peoples print functions. Apart from that it should probably look something like -
Code:
#include <iostream>
#include <string>
using namespace std;
void myprintf(string outprint, int integer, char character, float floatpoint);
int main()
{
myprintf("Hello World!!\n", 8, '\n', 9.70);
cin.get();
return 0;
}
void myprintf(string outprint, int integer, char character, float floatpoint)
{
outprint="";
cout << outprint;
cout << integer;
cout << character;
cout << floatpoint;
}
Not sure why you're erasing outprint before outputting it though.