Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Saturday at 3:51 PM
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Wednesday at 10:50 AM
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Windows RDP Only Rs.500 a month
Blogerwiki
Updated:
Nov 1, 2026
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
C/C++ Help on char data type
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="madurax86" data-source="post: 3386577" data-attributes="member: 1293"><p>can anyone tell me how to compare a char variable to a constant char?</p><p></p><p>the code below shows what i want to do but it doesnt compile<img src="/styles/default/xenforo/smilies/default/sad.gif" class="smilie" loading="lazy" alt=":(" title="Sad :(" data-shortname=":(" /></p><p>#include <cstdlib></p><p>#include <iostream></p><p></p><p>using namespace std;</p><p></p><p>int main(int argc, char *argv[])</p><p>{</p><p> char s[10];</p><p> int i;</p><p> s="sf(sf)fs";</p><p> for (i=0;i<10;i++) if (s<em>=="(") cout<<"";</em></p><p><em> system("PAUSE");</em></p><p><em> return EXIT_SUCCESS;</em></p><p><em>}</em></p><p><em></em></p><p><em>gives no error but it doesnt make the exe</em></p><p><em>pls help</em></p><p><em>thanx</em></p></blockquote><p></p>
[QUOTE="madurax86, post: 3386577, member: 1293"] can anyone tell me how to compare a char variable to a constant char? the code below shows what i want to do but it doesnt compile:( #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { char s[10]; int i; s="sf(sf)fs"; for (i=0;i<10;i++) if (s[i]=="(") cout<<""; system("PAUSE"); return EXIT_SUCCESS; } gives no error but it doesnt make the exe pls help thanx[/i] [/QUOTE]
Insert quotes…
Verification
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom