1,105,625 Community Members

Help with error C3861 C++.

Member Avatar
gator6688
Light Poster
47 posts since Sep 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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;
}
Member Avatar
Ancient Dragon
Achieved Level 70
27,633 posts since Aug 2005
Reputation Points: 5,232 [?]
Q&As Helped to Solve: 3,037 [?]
Skill Endorsements: 115 [?]
Team Colleague
Featured
Sponsor
 
0
 

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

Member Avatar
gator6688
Light Poster
47 posts since Sep 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
Ancient Dragon
Achieved Level 70
27,633 posts since Aug 2005
Reputation Points: 5,232 [?]
Q&As Helped to Solve: 3,037 [?]
Skill Endorsements: 115 [?]
Team Colleague
Featured
Sponsor
 
0
 

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

Member Avatar
gator6688
Light Poster
47 posts since Sep 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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;
}
Member Avatar
gator6688
Light Poster
47 posts since Sep 2007
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Any suggestions? Anyone?

Member Avatar
WaltP
Posting Sage w/ dash of thyme
9,363 posts since May 2006
Reputation Points: 2,905 [?]
Q&As Helped to Solve: 1,151 [?]
Skill Endorsements: 45 [?]
Team Colleague
 
0
 

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.

Member Avatar
Ancient Dragon
Achieved Level 70
27,633 posts since Aug 2005
Reputation Points: 5,232 [?]
Q&As Helped to Solve: 3,037 [?]
Skill Endorsements: 115 [?]
Team Colleague
Featured
Sponsor
 
0
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article