hi friends, hw assignment operator is executing? for example, int i=1,j,k; i++ + (j=i); nw the j value is 2; // i is incremented and assgined., eventhough it...
... I assume it to be compiler dependent. The order( Right to Left, or Left to Right) in which the arguments are pushed to stack will determine the result. -- ...
hi, in both cases, j is still 1; This is post increment then i still keeps value 1 in the expression, and after the execution of the expression, it gets value...
hello Vic,thank you for your comments now i understand that the last element of an array could not be always used but considering our friend's (brian's)...
hello! i'm trying to sort a list of objects using hash_multiset. i was wondering if anybody worked with hash_multiset and if they had any problems sorting more...
... no, you misunderstand what uchar y[1] means. I hear there is a lanugage out there (I don't know which, and I don't WANT to know) in which that defines an...
... by it's nature, hash_multiset (not part of the C++ standard) is unordered, and you cannot muck with the order. IF you need it ordered, use std::multiset. ...
... Don't do that. Looks like undefined behavior to me. Separate the above into multiple statements to declare your intentions. -- Thomas Hruska CubicleSoft...
... It doesn't look like UB Thomas - it /is/ UB :) To the OP, this code above is the bit invoking undefined behaviour - you're both modifying i (on the left)...
... any ... i'm not really interested in easy access... all i need is the elements to be in correct order. i also tried using multiset, but without success. do...
... The OP said 'hw' which usually means 'homework'...I now realize they meant 'how'. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus...
... std::multiset<yourtype> theset; ... have an object contain itself? perhaps you should tell us what exactly it is you think you want to do. or do you want...
#include <iostream> int main() { char bdate[1]; cin >> bdate; cout << bdate; } ... wht's wrong in this?? this gives me an error : Untitled1.cpp: In function...
hello Vic thank you for all your responses. i was just trying to use union as an alternative to that problem and hence following your response i changed the...
... X ... exactly ... yes, i was trying to create an object to contain a collection of it's own types and to sort that collection. i managed to make it work...
... std::cin std::cout -- Brett ... "In the rhythm of music a secret is hidden; If I were to divulge it, it would overturn the world." -- Jelaleddin Rumi...
... We don't do your homework for you. Are you having a specific problem with something? -- Brett ... "In the rhythm of music a secret is hidden; If I were to...
#include <iostream> using namespace std; int main() { char bdate[1]; cin >> bdate; cout << bdate; return 0; } this will do it. ... From: Hardik Patel...
hi, you need to change your code as: either: #include <iostream> using namespace std; { char bdate[1]; cin >> bdate; cout << bdate; } or #include <iostream> { ...
... Use two random numbers - one to generate the x coordinate, the other the y coordinate. You can limit each direction using the modulus operator % #define...
... Ah - you need txtSpk2.0 installing then Thomas... homework is h/w. ;) Not that we usually get people explicitly telling us that what their question relates...
Hi, I am wondering why my compiler gcc doesn't complain with following code #include<iostream> int main() { int j; std::cin>>j; int k[j]; } Without new or...
... http://www.cplusplus.com/doc/tutorial/namespaces.html -- Brett ... "In the rhythm of music a secret is hidden; If I were to divulge it, it would overturn...
... More than likely, you are using stack space...assuming the compiler hasn't completely optimized out the 'int k[j];' line because 'k' is never used (you...
... A better explanation might be: "Merges all objects and variables in the 'std' namespace into the current scope. In this case, the global scope for the...
pl help me wit tis..... wat is t actuall function of cin.pushback(ch).... in some cases,though pushback(ch) is used the input stream is taken without...
Can we allocate 2D array (dynamically) in one line. int **p; int i,j; std::cin>>i>>j; p=new int[i][j]; ... delete [][]p; Is the above code snippet acceptable? ...
hello everyone there i m creatin "window registry editor" in C# . can anybody tell me any usefull tweaks or projects that can be done by editing window...