Message 1 of 5
strcmp function
Not applicable
07-21-2003
06:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I have been trying to compile a sample project in ObjectARX SDK (named
brsamplevc4x.dsw) and kept receiving an error: 'strcmp' : undeclared
identifier.
Could anybody tell me what was wrong with the strcmp function in the
following codes:
AcDb::SubentType subType;
char opt[128];
while (Adesk::kTrue) {
ads_printf("+AFw-nEnter Subent Type: ");
ads_initget(NULL, "Edge Face Brep");
if ((adsError = ads_getkword("Edge/Face/: ", opt))
== RTCAN) return adsError;
// Map the user input to a valid subentity type
if (strcmp(opt,"Brep") || strcmp(opt,"")) {
subType = kNullSubentType;
break;
} else if (strcmp(opt, "Face") == 0) {
subType = kFaceSubentType;
break;
} else if (strcmp(opt, "Edge") == 0) {
subType = kEdgeSubentType;
break;
}
}
Thanks,
Herbert Nguyen
I have been trying to compile a sample project in ObjectARX SDK (named
brsamplevc4x.dsw) and kept receiving an error: 'strcmp' : undeclared
identifier.
Could anybody tell me what was wrong with the strcmp function in the
following codes:
AcDb::SubentType subType;
char opt[128];
while (Adesk::kTrue) {
ads_printf("+AFw-nEnter Subent Type: ");
ads_initget(NULL, "Edge Face Brep");
if ((adsError = ads_getkword("Edge/Face/
== RTCAN) return adsError;
// Map the user input to a valid subentity type
if (strcmp(opt,"Brep") || strcmp(opt,"")) {
subType = kNullSubentType;
break;
} else if (strcmp(opt, "Face") == 0) {
subType = kFaceSubentType;
break;
} else if (strcmp(opt, "Edge") == 0) {
subType = kEdgeSubentType;
break;
}
}
Thanks,
Herbert Nguyen