why does not return error?

Hi, i use MS visual studio 6 and i wrote the following code:

#include<iostream>
using namespace std;

void something(int a,char b);

int main()
{

return 0;
}
void something(char a,char b) //Here is a different decleration
{
cout<<"i am something \n";
}

if I don't initiallize "something()" in main with values the compiler does not return me any error or warning. Why is that??? (thanks)
1. You don't "initialize" functions...
2. You're just overloading a function, but only the first overload is visible from main.
3. You will get a linker error about void something(int a, char b); because you never define it after you initialize it.
Ok,thanks ;)
Topic archived. No new replies allowed.