[lug] help

heero yui heero_91 at hotmail.com
Sat Jun 8 19:12:16 MDT 2002


I am having a problem with a C++ program using   findMax() .
  
I am only copying it out of the book and I did it exactly the same, but the linker still gives me this error:
  
a:\61.o(.text+0xb1):61.cpp: undefined reference to `findMax(int, int)'

Could you please tell me how to fix this program?
  
  
Also here is the program...
  
#include <iostream.h>
#include <stdio.h>

void findMax(int, int);  // the function declaration (prototype)
  
int main(int argc, char *argv[])
{
   
  int firstnum, secnum;
  
  cout << "\nEnter a number: ";
  cin >> firstnum;
  cout << "Great! Please enter a second number: ";
  cin >> secnum;
   
  findMax(firstnum, secnum); // the function is called here

  return 0;
}
  
 Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20020608/5158c472/attachment.html>


More information about the LUG mailing list