I have searched on the internet for a 'working' double to char* does anyone have any idea? I need to pass the string to a function that takes a char* as an argument.
Elixir42 0 Junior Poster in Training
Recommended Answers
Jump to PostC++11:
std::to_string()
http://en.cppreference.com/w/cpp/string/basic_string/to_string
Jump to PostYou can pass a string to a function that needs a
char *
by using thec_str()
method of the string class. thec_str()
function returns aconst char *
that holds what the string contains. in order for this to work the function you are passing the string into …
All 6 Replies
Gonbe 32 Newbie Poster
vijayan121 1,152 Posting Virtuoso
Elixir42 0 Junior Poster in Training
Elixir42 0 Junior Poster in Training
NathanOliver 429 Veteran Poster Featured Poster
Elixir42 0 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.