positiveblue / SimpleSatSolver

A Simple Sat Solver
MIT License
1 stars 1 forks source link

error in cin #3

Open tuytoosh opened 6 years ago

tuytoosh commented 6 years ago

I want to use this code for solve a simple sat and I have following error in line 58 of code

could be 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>

positiveblue commented 6 years ago

Hi @tuytoosh

What process did you follow?

If so, which is the format of your input file?

tuytoosh commented 6 years ago

Hi @jomsdev , thanks for your answer. I just copied the sss.cpp code into visual studio`s new project and builded it... I am working in windows 10.

positiveblue commented 6 years ago

This code has only been tested in *NIX like systems (MacOS, Arch, Debian and Ubuntu).

I assume that your error is at compile time. (Am I right?)

The dependencies of this project are just stl ones

#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <vector>
#include <time.h>

line 58 is cin >> aux >> numVars >> numClauses;. The std::cin function is part of the <iostream> library.

If it is a "runtime" error, it's about the file format. Does it match with the format of the other inputs? (check this one for example

tuytoosh commented 6 years ago

@jomsdev My error is at compile time... I am compiling code in microsoft visual studio without using cmake or...

tuytoosh commented 6 years ago

image

positiveblue commented 6 years ago

@tuytoosh did you manage to solve the problem?

if not, try to compile a simple program with the same feature

#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <vector>
#include <time.h>

using namespace std;
int main() {
    int x;
    cin >> x;
    cout << "your integer was: " << x << endl;
}