2 Replies - 1710 Views - Last Post: 30 July 2012 - 04:17 PM Rate Topic: -----

#1 sf-coder  Icon User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 16
  • Joined: 28-July 12

error LNK2019: unresolved external symbol "int __cdecl Addition(vo

Posted 30 July 2012 - 04:11 PM

hey guys today i was just playing around and trying to make a simple addition cmd program and i keep getting this error:


1>------ Build started: Project: functions, Configuration: Debug Win32 ------
1> functions.cpp
1>functions.obj : error LNK2019: unresolved external symbol "int __cdecl Addition(void)" (?Addition@@YAHXZ) referenced in function _main
1>C:\Users\ilgar\Documents\Visual Studio 2010\Projects\functions\Debug\functions.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Here is my code:
#include <iostream>
#include <conio.h>
using namespace std;

int Addition();

void main(){
	Addition();
	_getch();
}

int Additon(){
	int num1 = 100;
	int num2 = 50;
	int Answer;
	Answer = num1 + num2;
	cout << Answer;
	return 0;
}
		


Is This A Good Question/Topic? 0
  • +

Replies To: error LNK2019: unresolved external symbol "int __cdecl Addition(vo

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 3989
  • View blog
  • Posts: 12,304
  • Joined: 25-December 09

Re: error LNK2019: unresolved external symbol "int __cdecl Addition(vo

Posted 30 July 2012 - 04:16 PM

Check your spelling of your function name, it's wrong somewhere.


Jim
Was This Post Helpful? 1
  • +
  • -

#3 sf-coder  Icon User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 16
  • Joined: 28-July 12

Re: error LNK2019: unresolved external symbol "int __cdecl Addition(vo

Posted 30 July 2012 - 04:17 PM

line 12
int Additon(){



changed thanks my friend
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1