Why won't this work?
Output: 0Code:#include<iostream> using namespace std; int main() { int a,b,c; a = 6; b = 3; c = (a%b); cout << c; if(c = 0) cout << "c is my homie"; return 0; }
That's is - no "c is my homie". Why not? Thanks from the newbie!
Why won't this work?
Output: 0Code:#include<iostream> using namespace std; int main() { int a,b,c; a = 6; b = 3; c = (a%b); cout << c; if(c = 0) cout << "c is my homie"; return 0; }
That's is - no "c is my homie". Why not? Thanks from the newbie!
should beCode:if(c = 0) cout << "c is my homie";
Code:if(c == 0) cout << "c is my homie";
STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.
Duh! Thanks.