cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
finding ' symbol
finding ' symbol
Sep 25, 2016 at 12:55am UTC
closed account (
oEwqX9L8
)
I'm writing a bit of code that needs to determine if a char variable is an apostrophe ('). My code doesn't seem to recognize it though. Does using the escape character mess up my comparison?
1
2
3
if
(symbol ==
'\''
) {
//call function
}
thanks for any help!
Sep 25, 2016 at 12:56am UTC
SakurasouBusters
(732)
Nothing is wrong here from the first glance.
Can you post your full code?
Sep 25, 2016 at 1:33am UTC
closed account (
48T7M4Gy
)
Does using the escape character mess up my comparison?
Why not just try it with a couple of lines of code and satisfy yourself it works as you expect under test? :)
Sep 25, 2016 at 2:10am UTC
closed account (
oEwqX9L8
)
thanks for the help!
Topic archived. No new replies allowed.