473,624 Members | 2,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with fatal errors

3 New Member
I'm new to C++ and I am struggling with the whole separate function thing and I am so frustrated right now it's not even funny. What i'm supposed to do is this code and I ask for the 1st number and the 2nd number and then output the quotient and remainder. So I did the code and I fixed most of the errors and now I have 2 errors that say:

1>C:\Users\Rebe cca Vance\Documents \Visual Studio 2005\Projects\H W_3b\Debug\HW_3 b.exe : fatal error LNK1120: 1 unresolved externals


1>3b.obj : error LNK2019: unresolved external symbol "int __cdecl GetRemainder(vo id)" (?GetRemainder@ @YAHXZ) referenced in function _main


I don't know what these mean. Here is my code. Please someone help me!

# include <iostream>
using namespace std;

int GetNum1 ();
int GetNum2 ();
int GetQuotient ();
int GetRemainder ();
void PrintSum (int, int, int, int);

int main ()
{
int num1;
int num2;
int quotient;
int remainder;
num1=GetNum1 ();
num2=GetNum2 ();
quotient=GetQuo tient ();
remainder=GetRe mainder ();
return 0;
}

int GetNum1 ()
{
int num1;
cout << "Enter first number\n";
cin >> num1;
return num1;
}

int GetNum2 ()

{
int num2;
cout <<"Enter second number\n";
cin >> num2;
return num2;
}

int GetQuotient ()

{int num1;
int num2;
int quotient;
quotient=num1/num2;
return quotient;
}

int GetRemainer ()

{int num1;
int num2;
int remainder;
remainder=num1% num2;
return remainder;
}

void PrintSum ()
{int num1;
int num2;
int quotient;
int remainder;
cout << num1 << "divided by "<< num2<< " equals " << quotient << " with a remainder of "<<remainder<<" .\n";
}
Mar 4 '08 #1
2 1444
oler1s
671 Recognized Expert Contributor
int GetRemainer ()
See a problem with your spelling? Here's how I found your problem. I saw that you had a linking problem, with an unresolved external symbol called GetRemainder. It's a function, because of the syntax int _cdecl GetRemainder(vo id). I got this information from the error message.

The linker would complain about a missing function if you tried to use a function, but didn't have code for it. If you misspell the function name, well the compiler's not going to find it, right?

In the future, use CODE tags. They are mandatory for blocks of code like yours.
Mar 4 '08 #2
ichabod079
3 New Member
ok thank you so much for your help :)
Mar 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4681
by: Phil Powell | last post by:
Actually the client is saying it sometimes happens and sometimes doesn't happen, and when they refresh their screen it clears itself (I assume the memory clears). Here is line 1135: $result = mysql_query($this->query, $this->dbcnx) or die(@include("$DOCUMENT_ROOT${devpath}errors/query_error.php")); It is found here in this class method:
8
9991
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function fetchRow() on a non-object." What are the available options here? Am I supposed to check I have a real object whenever I perform
1
13660
by: Mike | last post by:
Last weekend I decided to install Apache 2.0.53-win32-x86-no_ssl PHP 5.0.3 Smarty 2.6.7 MySQL essential-4.1.10-win32 I have Apache up (Port 80 blocked at the router and firewall!) and I have got Smarty working. I haven't got around to installing MySQL. I am now in chapter 8 'Error and Exception Handling' of
8
5462
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
3
3980
by: Ramesh Dodamani | last post by:
Environment: XP Pro, VS.Net 2003, .Net 1.1.4322 with SP1 & KB Hotfix 886903 P4 2.2GHz, 1 GB RAM My system was working fine till a few weeks back when I started seeing the following errors. "aspnet_wp.exe (PID: xxxx) stopped unexpectedly" I am seeing the this error currently happen, but unlike the description in articles Q823409 or 821387, I am not downloading any large file .The error
1
1578
by: Simon Kittle | last post by:
Hi, Is it possible in PHP to provide a nice pretty page when a fatal error occurs? (Or any of the errors listed here http://uk.php.net/manual/en/function.set-error-handler.php which you cannot catch). I have error_reporting turned off as I have a production server - but that just gives a blank page which is less than good.
11
26571
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
1
1159
by: Oltmans | last post by:
Hi all, I've been writing C# code using Visual Studio 2005 for some time now but for the first time I've to write ANSI C code using Visual Studio 2005. I followed this article http://support.microsoft.com/kb/829488 that does a good job of explaining how to write ANSI C using Visual Studio 2005. When I write the following program it compiles and runs fine. I get the "Hello World" message shown in the command prompt. #include <stdio.h>
0
8249
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.