error C3861: 'enterData': identifier not found, even with argument-dependent lookup

error C3861: 'printCheck': identifier not found, even with argument-dependent lookup

Why am I getting this error?

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;




int _tmain(int argc, _TCHAR* argv[])
{
	
    string todaysDate,firstName, lastName;
	double amount;
	enterData(&todaysDate, &firstName, &lastName, &amount);
    printCheck(&todaysDate, &firstName, &lastName, &amount);

	cout << "Enter today's date: ";
	cin  >> todaysDate;
	cout << "Enter the first name: ";
	cin  >> firstName;
	cout << "Enter the last name: ";
	cin  >> lastName;
	cout << "Enter the amount: ";
	cin  >> amount;


	cout << "Zzyz Corp                                      Date: (today's date)"<<endl;
	cout << "1164 Sunrise Avenue                                        "<<endl;
	cout << "Kalispell, Montana\n                                         "<<endl;

	cout << "Pay to the order of: (firstName lastName)      $ (amount)\n "<<endl;
	cout << firstName << " " <<  lastName;
    cout << "      $" << amount << endl;
	

	cout << "UnderSecurity Bank                                         "<<endl;
	cout << "Missoula, MT                                               "<<endl;
	cout << "                                                ____________________"<<endl;
	cout << "                                                Authorized Signature";

	cout << endl << endl;
	return 0;
}

Recommended Answers

All 7 Replies

functions must be declared before they can be called. Your previous post contains the function prototype -- why did you delete it?

I don't know why I deleted it. I think I am getting closer to finishing it though. I think.

you need the prototype for both functions. You also have to write the functions.

I have the prototype for both functions. I just have to figure out how to get them all to work together and how to fill in the info on the check.

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

void enterData(string todaysDate, string firstName, string lastName, double amount);
void printCheck(string todaysDate,string firstName,string lastName,double amount);




int _tmain(int argc, _TCHAR* argv[])
{
	
    string todaysDate,firstName, lastName;
	double amount;
	
    

	cout << "Enter today's date: ";
	cin  >> todaysDate;
	cout << "Enter the first name: ";
	cin  >> firstName;
	cout << "Enter the last name: ";
	cin  >> lastName;
	cout << "Enter the amount: ";
	cin  >> amount;


	cout << "Zzyz Corp                                      Date: (today's date)"<<endl;
	cout << "1164 Sunrise Avenue                                        "<<endl;
	cout << "Kalispell, Montana\n                                         "<<endl;

	cout << "Pay to the order of: (firstName lastName)      $ (amount)\n "<<endl;
	cout << firstName << " " <<  lastName;
    cout << "      $" << amount << endl;
	

	cout << "UnderSecurity Bank                                         "<<endl;
	cout << "Missoula, MT                                               "<<endl;
	cout << "                                                ____________________"<<endl;
	cout << "                                                Authorized Signature";

	cout << endl << endl;
	return 0;
}

Any suggestions? Anyone?

Any suggestions? Anyone?

Yes.
1) Use code tags as explained on the background of the box you typed you messages in, as well as in the Forum Rules
2) Don't bump your threads. It's rude, and most of us have lives outside of DaniWeb. We'll get to your problem when we get to it.
3) Explain you current problem. Saying you fixed something and posting new code does not tell us what's wrong now.

I already made the suggestions in your previous thread. Read them again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.