Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7880195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:05:09+00:00 2026-06-03T04:05:09+00:00

This is my code: #include <iostream> #include <fstream> #include <cstdlib> #include <stdio.h> #include <curl/curl.h>

  • 0

This is my code:

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <stdio.h>
#include <curl/curl.h>
using namespace std;
int main ()
{
    ifstream llfile;
    llfile.open("C:/log.txt");

    if(!llfile.is_open()){
        exit(EXIT_FAILURE);
    }

    string word;
    llfile >> word;
    llfile.close();
    string url = "http://example/auth.php?ll=" + word;

    CURL *curl;
    CURLcode res;

    curl = curl_easy_init();
    if(curl) {
        curl_easy_setopt(curl, CURLOPT_URL, url);
        res = curl_easy_perform(curl);

        /* always cleanup */
        curl_easy_cleanup(curl);
    }
    return 0;
}

This is my error when compiling:

main.cpp|29|warning: cannot pass objects of non-POD type 'struct std::string' through '...'; call will abort at runtime

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:05:11+00:00Added an answer on June 3, 2026 at 4:05 am

    The problem you have is that variable argument functions do not work on non-POD types, including std::string. That is a limiation of the system and cannot be modified. What you can, on the other hand, is change your code to pass a POD type (in particular a pointer to a nul terminated character array):

    curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple code: #include <iostream> #include <fstream> using namespace std; int main(void)
This is my code: #include <iostream> #include <fstream> using namespace std; int main() {
#include <iostream> #include <fstream> #include <cstdlib> using namespace std; const int FILENAME_MAX=20; int main()
here is code #include <iostream> #include <fstream> #include <cstring> using namespace std; int main()
#include <iostream> #include <fstream> using namespace std; int main() { ifstream stream1(source.txt); string line
This is the C++ code: #include<iostream> using namespace std; int a=8; int fun(int &a)
This code: #include <iostream> #include <cstdio> #include <fstream> #include <string> int main() { std::remove(test.txt);
Here is my code: #include <iomanip> #include <fstream> #include <iostream> using namespace std; int
Consider this code: #include <iostream> using namespace std; class hello{ public: void f(){ cout<<f<<endl;
Look at this code please: #include <iostream> using namespace std; class Ratio { public:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.