Reputation: 71
Okay, so, if I do this in a C++ header function:
#include <iostream>
#include <string>
using namespace std;
// Prerequisites ^
int main(){
int io_print([Here's what I need help with]){};
};
I know the code example was completely syntax wrong, but what I need help with is trying to use a type which allows integer, float and string. So I can simply do io_print(40) and io_print("Hi"). I've tried this and simply can't find any type that allows this, if anyone by any chance knows the answer then please reply.
I'm doing this as I want to redefine functions. Please don't ask why.
Upvotes: 3
Views: 542