-2

Several answers (like splitting int from a string) are proposing

#include <sstream>

Unforunately, doesn't compile for me (error "sstream: No such file or directory"). I found I can use

#include <strstream> 

instead. Ok, now, with

std::string s = "100 123 42";
std::istringstream is( s );

I got "undeclared variable `istringstream' (first use here)". Ok, trying out:

std::istrstream is(s);

Almost ok. Error: "no matching function for call to `istrstream::istrstream (string &)'". But at least it compiles with:

std::istrstream is();

So I feel I'm somewhere near:) What's missing?

Community
  • 1
  • 1
avj
  • 1,626
  • 1
  • 19
  • 23

1 Answers1

0

ok, I installed Code Blocks, and used mingr32-g++ compiler. My current builder configuration:

{
"cmd": ["mingw32-g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"path":"C:/Program Files (x86)/CodeBlocks/MinGW/bin",
    "variants":
    [
        {
            "name": "Run",
            "cmd": ["g++", "$file", "-o", "$file_base_name", "&&", "$file_path/$file_base_name"],
            "shell": true
        }
    ]
}
avj
  • 1,626
  • 1
  • 19
  • 23