Linked Questions
96 questions linked to/from How to convert a std::string to const char* or char*
-2 votes
2 answers
200 views
C++ error of buffer after strcpy
This is piece of my code std::string s; getline(cin, s); std::cin.clear(); s.erase(std::remove_if(s.begin(), s.end(), my_predicate), s.end()); char *str1 = (char*)malloc(...
-1 votes
2 answers
145 views
Why would a change in a function header cause a Pointer assignment to not function?
When I change the last parameter in the function header from char Findthis[64] to char * Findthis when debugging the Testthis=&*Look_in; assignment breaks. Look_in has a memory address and member ...
0 votes
3 answers
127 views
Reading from file using as parameter char*
I am using a function that uses a char* parameter; i am reading from a file for input. Here is my code: std::ifstream infile("file.txt"); std::string line; while(std::getline(infile,line)){ if(...
-3 votes
2 answers
158 views
Why does CURLE_OPT_MALFORMAT occur when I do curl_easy_setopt(m_curl_handle, CURLOPT_URL, (char*)m_sUrl.c_str())?
I am curious why Alternative #1 functions okay while Alternative #2 returns CURLE_OPT_MALFORMAT when I do a curl_easy_perform(m_curl); Alternative #1 curl_easy_reset(m_curl); char sUrl[8192]; /* In ...
0 votes
2 answers
72 views
Download XLS files in a Cpp loop
Developing from my previous question, wanted to generalize the behavior so that would download files within a specific data range. So, modified the code to look like this #include "pch.h" #...
0 votes
0 answers
18 views
Why can I not use the member function AppendText for RichTextBox with a string variable but it works fine with text written as the argument? [duplicate]
Please help me figure out what is wrong I can't find anything about this and haven't found the definition of this function C# keeps coming up and it doesn't apply. for (auto& p: fs::...