so this is my first "test" using static_cast, i have never done so, so please bear with me (i am very new to c++, stated 3 days ago)
// ConsoleApplication3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
#include "string"
int main()
{
float value = 2.5f;
int temp;
std::cout << value;
std::cout << static_cast<std::string>(value) ;
std::cin.get();
}
it gives an error saying
error C2440: 'static_cast' : cannot convert from 'float' to 'std::string'
IntelliSense: no suitable constructor exists to convert from "float" to "std::basic_string, std::allocator>"
am I missing something?