This is my first time writing a proper question for StackOverflow so if I am making mistakes please correct me!
I am trying to load in the v, vn and vt lines from an obj file. This code is in a while loop after getting the next line from the solution:
string type (" ");
glm::vec3 vertex;
sscanf_s(line.c_str(), "%s %f %f %f\n",&type, &vertex.x, &vertex.y, &vertex.z);
The sscanf_s line throws these warnings:
Warning C6067 _Param_(3) in call to 'sscanf_s' must be the address of a string. Actual type: 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *'.
Warning C6270 Missing float argument to 'sscanf_s': add a float argument corresponding to conversion specifier '5'.
Warning C6273 Non-integer passed as _Param_(4) when an integer is required in call to 'sscanf_s' Actual type: 'float *': if a pointer value is being passed, %p should be used.
I am confused as the three float values from the vector should surely throw the same error. When I run the code I also get an access violation writing location error on this line.
Please help me! I am new to c++!