| | |
substitue of comparison operators
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2005
Posts: 164
Reputation:
Solved Threads: 5
C++ Syntax (Toggle Plain Text)
int a=rand(); int b=rand(); int c=rand(); std::vector<int> vec; vec.push_back(a); vec.push_back(b); vec.push_back(c); std::cout<< *std::min_element(vec.begin(),vec.end())<<std::endl;
•
•
•
•
Originally Posted by Stoned_coder
not a comparison operator in sightC++ Syntax (Toggle Plain Text)
int a=rand(); int b=rand(); int c=rand(); std::vector<int> vec; vec.push_back(a); vec.push_back(b); vec.push_back(c); std::cout<< *std::min_element(vec.begin(),vec.end())<<std::endl;
•
•
•
•
Originally Posted by Narue
>Can we find the smallest of three integers, without using any of the comparison operators....logic please
Can we find out why you're interested in such a silly problem? Logic please.
•
•
•
•
Originally Posted by bumsfeld
silly logic indeed
It's funny, but almost all of sunnypalsingh's questions sound like questions that an idiot teacher would ask. Knowing the answer to such questions doesn't help anyone understand programming and definately doesn't help a programmer develop good technique.
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
•
•
•
•
Originally Posted by chrisbliss18
It's funny, but almost all of sunnypalsingh's questions sound like questions that an idiot teacher would ask. Knowing the answer to such questions doesn't help anyone understand programming and definately doesn't help a programmer develop good technique.
•
•
•
•
Originally Posted by sunnypalsingh
bcoz i was not able to do it
The benefit of this problem is that in solving it, you'll improve your creativity. Yes, creativity is learned. Well, conditioned, maybe. At least the problem-solving kind of creativity is. Anyway, this skill is important to your ability in the arena of computer programming, and you might as well get good at it now, or else you'll suck forever.
![]() |
Other Threads in the C++ Forum
- Previous Thread: continued new and malloc
- Next Thread: virtual methods and inheritance
Views: 2719 | Replies: 13
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






