FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
October 01, 2005

Managed String Library for C

(Page 7 of 7)

October, 2005: Managed String Library for C

Listing 6

// create valid char set
if (retValue = strcreate_m(&str1, "abc") ) {
  fprintf(
    stderr, 
    "Error %d from strcreate_m.\n", 
    retValue
  );
}  
if (retValue = setcharset(str1)) {
  fprintf(
    stderr, 
    "Error %d from  setcharset().\n", 
    retValue
  );
}
if (retValue=strcreate_m(&str1, "aabbccabc")) {
  fprintf(
    stderr, 
    "Error %d from strcreate_m.\n", 
    retValue
  );
}
// create string with invalid char set
if (retValue=strcreate_m(&str1, "abbccdabc")) {
  fprintf(
    stderr, 
    "Error %d from strcreate_m.\n", 
    retValue
  );
} 

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK