Hi
I have wrote this test program for trying different things with c++ and when I pass a character array to a member function, the compiler complains.
Here is the code:
Code:
#include <stdio.h>
#include <string.h>
class Account
{
char customer[251];
char accountNumber[16];
int balance;
public:
int changeCustomerInfo(char c[]);
};
int main()
{
char s[20] = " This is test";
int num = 8;
Account test;
num = test.changeCustomerInfo(s);
return 0;
}
int changeCustomerInfo(char c[])
{
return 0;
}
and the error message the compiler gives is:
/tmp/ccy4EJL2.o: In function `main':
2.cpp
.text+0x6e): undefined reference to `Account::changeCustomerInfo(char*)'
collect2: ld returned 1 exit status
I've tried many things, but I can't figure out what is preventing it from compiling properly, can you tell me what my mistake is?
Thank You!