#include <iostream> #include <cstring> using namespace std; int main(){ char s[100] = "(())())"; int p = 0; for(int i(0);i < strlen(s);i++){ if (s[i] == "("){parni++;} } return 0; } Why does not work, please tell me.
test.cpp | 9 | error: ISO C ++ forbids comparison between integer and [-fpermissive] |
s[i] == '('. - VladD