Encountered a warning

After building I get a warning. How do I fix it?

Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <iostream>
#include <string.h>
using namespace std;

//prototype
int processline(char*);
int GetString();

int main()
{
	GetString();
}

int GetString()
{
	char buffer [300];
	while (cin.getline (buffer, 300))
		{
			int wordCount = 0;
			wordCount += processline (buffer);
		
		
		cout << endl << "There were " << wordCount << " words." <<endl;
		
	}
	return 0;
}
int processline (char* buffer)
{
	int i, count = 0, beg = 0, out =0;
    int length = strlen(buffer);
	buffer[length] = ' ';
	buffer[length + 1] = '\0';
	length += 2;
	char output [300];
	char space = ' ';

	for (i=0; i < length; i++)
	{
		if (isspace(buffer[i])!= 0)
		{
		  if(i != beg)
		  {
			strncpy((output+out), (buffer+beg), (i-beg));
			out += i-beg;
			//strcat(output+out, space);
			output[out] = space;
			out++;
			count++;
		  }
		  
		  beg = i+1;
	
		}
		
	}
	  
	output[out] = '\0';
	cout << output << endl;
	return count;
}


Warning:
1
2
3
4
5
6
7
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\string.h(157) : see declaration of 'strncpy'
1>Linking...
1>LINK : C:\Users\me\Documents\Visual Studio 2008\Projects\ydtkko\Debug\ydtkko.exe not found or not built by the last incremental link; performing full link
1>Embedding manifest...
1>Build log was saved at "file://c:\Users\me\Documents\Visual Studio 2008\Projects\ydtkko\ydtkko\Debug\BuildLog.htm"
1>ydtkko - 0 error(s), 1 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Last edited on
You seem to have missed out the actual warning. Is it in the line above
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\string.h(157) : see declaration of 'strncpy'
>
closed account (zb0S216C)
Quote from Bytes.com:
OK basically you can ignore this error becaus in fact it is a warning.

In an incremental link the linker just replaces the code for the objects in the exe that have changed, it is quicker than a full link which is why it is done.

In a full link the executeable is create from the ground up.

This warning message is issued when you have deleted objects or other files that mean that the linker can not perform an incremental link. It can always do a full link. The warning message is just telling you that the information required for an incremental link is missing so the linker has opted to do a full link.
Topic archived. No new replies allowed.