C困扰我对弦乐的处理.我心中有这样的伪代码:
char *data[20];
char *tmp; int i,j;
for(i=0;i<20;i++) {
tmp = data[i];
for(j=1;j<20;j++)
{
if(strcmp(tmp,data[j]))
//then except the uniqueness, store them in elsewhere
}
}
Run Code Online (Sandbox Code Playgroud)
但是当我对此进行编码时,结果很糟糕.(我处理了所有内存,小东西等)问题显然在第二个循环中:D.但我想不出任何解决方案.如何在数组中找到唯一的字符串.
输入示例:abc def abe abc def deg输入唯一的输入:应找到abc def abe deg.
我正在寻找调整背景颜色的系统功能。它就像
system("color",somecolorcodes);
有人知道吗?
在 Windows XP 或 7 上!