ERROR C3861 microsoft visual 2010

HELLO c++ gurus, my name is andres and im here to ask for your help.

#include <cctype>
#include <iostream>
#include <string>
using namespace std;

bool bermudas_or_coordinate() // true for bermudas, false for coordinates
{
cout << "Welcome to ANDRES’ hurricane distance/ time calculator, is the hurricane at Bermudas or at coordinates 16 64? ";
while (true)
{
string s;
cin >> ws; // skip any leading whitespace
getline( cin, s );
if (s.empty()) continue;
switch (toupper( s[ 0 ] ))
{
case 'B': return true;
case 'C': return false;
}
cout << "pleas type B for Bermudas or C for coordinates 16 64? ";
}
}

int main()
{
if (B_or_C())
cout << "the hurricane will reach its final destination of abc miles in abc hours!\n";
else
cout << "the hurricane will reach its final destination of 12345 miles in 12345 hours!\n";
return 0;
}




in the program above im finding an error c3861, i really cant figure this out by my self, help please!

best regards andres
It would be easier if you had posted the error message, but, anyway, c3861 means 'identifier not found'. I suppose that's ws you don't declare it anywhere. I guess it should be s. (line cin >> ws;). Also, function B_or_C() is not defined..
function B_or_C() stands for bermudas_or_ coordinates corrected, and that ws i change it for what u just suggested (s) but still does not work

what does the error message say?
error C3861: 'bermudas_or_coordinates': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

how can i set the identifier to read th values of B or C?
In your main() function:

 
if (B_or_C()) // you never define function B_or_C() 




Well, in the code you posted that function was called bermudas_or_coordinate. No 's'. Could that be the problem?
how can i defined the function then? sorry if my questions may not make sene but im following some examples and try to apply to something else
help a noob please!
I have no idea why you wrote the line if(B_or_C()).

But I am guessing you may have meant to write if(bermudas_or_coordinate() instead.
i re-wrote it, but it doesnt work.
In the error message, compiler can't find 'bermudas_or_coordinates' . In you code, the function is called 'bermudas_or_coordinate' . If that's not it, then post your new code..
Topic archived. No new replies allowed.