strcmp

    2热度

    1回答

    我只是想知道是否有任何方法可以改变精灵批处理的着色器而不必使用新的网格来编写自定义着色器?

    0热度

    1回答

    我有绑定到对象的用户具有以下结构下拉: { userId:1, userLogin:"test", locale: { localeCode:"en-US" } } 该结构直接从C#模型类,其中用户和Locale来是作为关联链接的两个类(用户有一个Locale)。 所以我想定义下面的下拉列表,而不用做任何自定义逻辑,如以特殊方式序列化对象,或将$ watch添加

    4热度

    2回答

    我需要逐行搜索文件中的两个特定单词,如果它们存在,则打印“Found!”。 这FILE.TXT(有四列) bill gates 62bill microsoft beyonce knowles 300mill entertainment my name -$9000 student 以下是我提出的想法,但似乎并没有工作 char firstname[]; char lastname[];

    0热度

    4回答

    条件 可能重复:“是的,它的工作原理” How do I properly compare strings in C? #include <iostream> using namespace std; int main(){ char name[100]; cout<<"Enter: "; cin>>name; if(name == "hello")

    4热度

    4回答

    我有以下几点: int findPar(char* str) { int counter=0; while (*str) { if(str[0] == "(") <---- Warning { counter++; } else if (str[0]== ")") <---- Warning { counter--

    0热度

    5回答

    我遇到比较2个字符字符串都是同样的问题时: char string[50]; strncpy(string, "StringToCompare", 49); if(!strcmp("StringToCompare", string)) //do stuff else //the code runs into here even tho both strings are the sam

    0热度

    2回答

    我对C编程相当陌生,但尽力了解它。我有两个从两个纯文本文件填充的动态字符串。一种是字典的形式,另一种是用户输入。我想要得到的是二进制搜索词典中的每个用户输入词,并确定它是否存在(我猜想有点拼写检查)。 我卡在我的二进制搜索功能: char **dictElem; int dictSize; char **inputElem; int binsearch(const char *val){

    0热度

    4回答

    我的问题是,STRCMP()函数提出了以下问题: main.c:35: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast 虽然编译和以下运行程序时: Segmentation fault: 11 我知道错误是什么意思,我只是不知道任何其他方式来做到这一点...有没有想过使用it

    2热度

    3回答

    所以我读字符一个接一个从文件: char temp[3]; temp[0] = nextchar; printf("%c",temp[0]); //prints % temp[1] = nextchar = fgetc(srcptr); printf("%c",temp[1]); //prints 2 temp[2] = nextchar = fgetc(srcptr); pri

    1热度

    1回答

    我是很新的Visual C++相比较所以这可能是一个“小学生”的错误,但我希望下面的代码是不执行: #include "stdafx.h" #include <string.h> int _tmain(int argc, _TCHAR* argv[]) { if (strcmp((char*)argv[1], "--help") == 0) { printf