![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
question mark operator
Hi,
I having a hard time finding an online explanation of syntax involving ">?=" For example int ret = somevalue; int cur = somevalue; ret >?= cur; Can someone please explain this concept? If you have a online source, that would be even better. thanks -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|||
|
Re: question mark operator
On Aug 7, 7:36 am, utefan001 <utefan...@gmail.com> wrote:
> Hi, > I having a hard time finding an online explanation of syntax involving > ">?=" [...] > > Can someone please explain this concept? If you have a online source, > that would be even better. `<?' , `>?', '<?=' and `>?=' are all old non-standard G++ extensions. These deprecated operators were removed from GCC 4.2. Use std::min and std::max instead, please. http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_6.html http://gcc.gnu.org/gcc-4.2/changes.html HTH Jiang -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|||
|
Re: question mark operator
On 2008-08-07 00:36, utefan001 wrote:
> Hi, > I having a hard time finding an online explanation of syntax involving > ">?=" > For example You will have to search a long time before you find it because it is not in the C++ language. Perhaps you meant the conditional operator "?:" or the trigraph "??="? -- Erik Wikström [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|||
|
Re: question mark operator
utefan001 wrote:
> I having a hard time finding an online explanation of syntax involving > ">?=" > For example > > int ret = somevalue; > int cur = somevalue; > > ret >?= cur; > > Can someone please explain this concept? If you have a online source, > that would be even better. IIRC, that is a GCC extension, so you would be best off looking in the GCC documentation. From memory, I think it simply performs an assignment conditionally based on which of the two operands is greater, i.e. the code is equivalent to ret = std::max( ret, cur); or maybe if(cur>ret) ret = cur; Uli -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|