The error your compiler gives you is:
44|error: 'num1' was not declared in this scope
44|error: 'num2' was not declared in this scope
If you than look at your code you will find that the compiler is right, you are calling the function with two undefined arguments. num1 and num2 could be std::strings for all the compiler knows, it sure is not able to guess what the value of those undefined variables should be.
Because they are integers, you could put any integer value there, but I like lucky seven and the answer to everything :-p
You probably want to make two int variables, you could even call then num1 and num2, but you have to make those variables and assign a value to them before you call the function. I would suggest initializing them to 7 and 42 (I am that original), but it could be any integer value for as long as it is defined before your program reaches the function call.
I tried doing exactly that but then what do I put under main for the last part of my code to actually run. It ends before the void largest function is even called. This is my code thus far...
Functions should strive to only do one thing and do it well. So largest() should only be comparing two numbers to find the largest and return it. The problem arises that you have to overload the function so that if a user passes float or double instead of int the function has a variant to return it instead of cutting off the float or double. I could write three functions, or I could use Templates (a little advanced but largest() is the best time to show it).