Home > Back-end >  C cannot resolve external symbol
C cannot resolve external symbol

Time:09-16

Topic is: there is a string, with dry characters, required to enter a character, procedure will delete from the characters from a string, use external function implementation,

The various points below program compile time all have no problem, when debugging to the following error
Bother bosses to see what's going on, first here
thank you in advance?The main obj: error LNK2001: unresolved external symbol _print_string
The main obj: error LNK2001: unresolved external symbol _enter_string
The Debug/function. Exe: fatal error LNK1120:2 unresolved externals
An error occurred when execution link. Exe.

The source code is as follows:
 
#include
Void main ()
{
Extern void enter_string (char STR []);

Extern void delete_string (char STR [], char x);

Extern void print_string (char STR []);

/* the above three is to define the statement in this function you need to call other file defines the three functions of */

char c;

Char STR [80]./* the longest string can enter 80 characters */

Enter_string (STR);

Printf (" \ please enter the characters you need to remove a: ");

The scanf (" % c ", & amp; C);

Delete_string (STR, c);

Print_string (STR);

}


A second program:
 
#include


Void enter_string (char STR [80])
{
Gets (STR);
}

The third block
 


Void delete_string (char STR [], char x)
{
int i,j;

For (I=j=0; STR [I]!='\ 0'; I++)
{
If (STR [I]!=x)
{STR=STR [j++] [I];
}
}
STR [j]='\ 0';
}


The fourth block:
 
#include

Void print_string (char STR [])
{
Printf (" % s \ n ", STR);
}

CodePudding user response:

Put some source code in a project

CodePudding user response:

reference 1/f, Simple, Soft reply:
put some source code in a project of

Excuse me, if you want to request points program, what is the problem? Thank you for your answer,

CodePudding user response:

Don't understand what you say, block is what mean?

CodePudding user response:

reference 3 floor is Simple - Soft reply:
don't understand what you say, block is what mean?



Well,,, I also don't know whether this block, and, like this all the program compiled without error, and then a debugging is
  • Related