was wondering how to get a char * into a stringc. tried some of the following without luck.
char * model,texture;
stringc model2,texture2;
std::string model3,texture3;
model2 = "data/models/vehicles/oldChevy-Truck.3ds";
texture2 = "data/models/vehicles/oldChevy.bmp";
//model3 = model;
//texture3 = texture;
//todo figure out stringc copy to string
//model2 = model3.c_str();
//texture2 = texture3.c_str();
//strcpy(model,model2); // possibly a 20 char limitation
//strcpy(texture,texture2);
//model2 = &model;
//texture2 = &texture;
//model2 = stringc(model);
//texture2 = stringc(texture);
Char * to stringc
Char * to stringc
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
Re: Char * to stringc
Non-pointer version #1:
Non-pointer version #2:
Non-pointer version #3:
Pointer #1:
Pointer version #2:
Pointer version #3:
Code: Select all
stringc model2 = stringc("data/models/vehicles/oldChevy-Truck.3ds");
Code: Select all
const char* model = "data/models/vehicles/oldChevy-Truck.3ds";
stringc model2 = stringc(model);
Code: Select all
stringc model2;
model2 = "data/models/vehicles/oldChevy-Truck.3ds";
Code: Select all
stringc* model2 = new stringc("data/models/vehicles/oldChevy-Truck.3ds");
Code: Select all
const char* model = "data/models/vehicles/oldChevy-Truck.3ds";
stringc* model2 = new stringc(model);
Code: Select all
stringc* model2 = new stringc();
*model2 = "data/models/vehicles/oldChevy-Truck.3ds";
Re: Char * to stringc
figured out that my issue was with
char * test1,test2 ; is not the same as char * test1,*test2
thanks for the reply
char * test1,test2 ; is not the same as char * test1,*test2
thanks for the reply
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%