No, it don't work, the output is:
bash-3.1# gcc -lsqlite3 labsinf.c -o inf
labsinf.c: In function 'soundex':
labsinf.c:18: error: assignment of read-only location
labsinf.c:22: error: assignment of read-only location
labsinf.c:27: error: assignment of read-only location
labsinf.c:31: error: assignment of read-only location
labsinf.c:32: error: assignment of read-only location
labsinf.c:33: error: assignment of read-only location
labsinf.c:34: error: assignment of read-only location
labsinf.c:35: error: assignment of read-only location
>Your assignment above discards the const qualifier. It also ignores the
>fact that the types differ in their signedness. You should change your
>str variable to be a const char pointer, and then explicitly cast away
>the unsigned qualifier.
>
> const char *str;
>
> str = (const char*)sqlite3_value_text(...);
>
>HTH
>Dennis Cote
---------------------------------
Inviato da Yahoo! Mail.
La casella di posta intelligente.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users