how do u write this if then statment but in c++ if g=3282 then g=k;
to bad there wasnt a then like there is an else in c++
grunge man 0 Junior Poster
Recommended Answers
Jump to Post…>The << and >> operators are not interchangeable. You also have a few other syntax errors and unnecessary stuff that can be removed:
#include <cstdlib> #include <iostream> using namespace std; int main() { int a,b,k; cout<<"enter 1,2,or 3"; cin>>k; cout<<"enter 1,2,or 3"; cin>>b; a=k+b; cout<<endl<<a; system ("pause"); }
Jump to Post>You do realise that in C++, the main function, when an integer, expects a return value.
As a matter of fact, I'm quite familiar with that rule and all of the details that go along with it. Are you?>So you shouldn't snip off the "return 0;" part.
In …
Jump to Post>void main() is never ever acceptable
It's perfectly acceptable on a freestanding implementation. The rules we refer to when talking about main are exclusive to hosted implementations.what do you mean by "freestanding implenentation"? some embedded systems where there may not even be a main() function ? I doubt there …
Jump to PostYou're wrong (sorry). HTML is a markup language - it deals with PRESENTATION only. There is no real concept of Data or Data manipulation until you move into scripting (etc.)... and when you do, it's no longer just HTML.
EDIT: Ooops - sorry - my bad, new here. I …
Jump to PostErr.. buddy , it would be best you not resurrected dead threads. It would be really good if you just looked at the date of the last reply of a thread before posting in it. And by the way, the thread has been marked solved so please dont post in …
All 43 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
grunge man 0 Junior Poster
grunge man 0 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
grunge man 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
grunge man 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
grunge man 0 Junior Poster
grunge man 0 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
grunge man 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
Narue 5,707 Bad Cop Team Colleague
grunge man 0 Junior Poster
grunge man 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.