c++


What does this incremental syntax mean? [duplicate]


This question already has an answer here:
scope resolution operator without a scope
6 answers
I came across a line of code that is quite confusing to me. I tried searching but wasn't sure what to even search for.
The line is as follows:
int i = ++::i;
I am lost to whether this line evaluates to:
int i+= i ;
Any help would be appreciated
In
int i = ++::i;
the :: is there to tell the compiler use the i from the global scope. Without it the compiler is going to use the i you just declared which is undefined behavior. For more on that see Using newly declared variable in initialization (int x = x+1)?

Related Links

C++ specialized function template
Compiler errors with cmath on Mac OS X
Array of fstream in C++
Error: (E107) bind interface to port failed: interface already bound to port: port 'MC8051_ALU().AM.port_27' (sc_in)
Error LINK2019 when I try to make a training for face detection [duplicate]
Quickest way to iterate in a C++ vector
How can I use snmp++ to enable/disable a switch port?
i wan't to use char* in this code instead of string how? [closed]
Using inRange() in OpenCV to detect colors in a range
The string.h 's function does not work in C++ but string does [on hold]
How to efficiently insert/merge into thrust::device_vector?
Change to transparent rectangle
Why addDays not working? [on hold]
OpenGL or GLFW renders ok only when moving the window
How to make static callback c++
How to copy host vector to device vector by thrust

Categories

HOME
audio
perl
loadrunner
sitecore8
hardware
bloomberg
linux-device-driver
login
strongswan
delaunay
libreoffice-base
video.js
firebreath
amazon-route53
atlassian-sourcetree
j
pad
4d-database
sprite
xfce
workspace
apache-samza
indexoutofrangeexception
uppaal
bing-api
neo4jclient
byte
omnipay
python-tesseract
nexmo
chmod
asp.net-mvc-routing
regex-negation
sequences
tridion
apache-hive
uisearchbar
cachemanager
notnull
dreamhost
mlt
webos
reddit
auto-value
getelementsbyclassname
evosuite
orika
knockout-validation
nuodb
google-keep
embedded-javascript
nslog
review-board
kendo-datepicker
powergrep
anonymity
http-accept-header
bitcount
template-strings
nstablecolumn
order-of-operations
.a
pig-udf
google-plugin-eclipse
class-relationship
chap-links-library
tokumx
nxt-python
android-handlerthread
kif-framework
opendocument
resourcedictionary
stencils
citrix-access-gateway
pull-to-refresh
gwt-2.5
osx-gatekeeper
ext-direct
iphone-sdk-3.0
cohesion
umbraco5
rails-models
vtl
viewexpiredexception
cck
language-theory
jquery-ui-plugins
white-box-testing
astoria

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile