Preprocessor command, assigned the variable and then compare the variable to int. How can I get around this?

#define ON 1
#define OFF 0
in seperate code
int variable = ON;
variable is globally define for that module.
in seperate code
if (variable == ON)
the complier errors off on the if (variable==ON)
My guess variable is variable in of type int and ON is a preprocessor command. Therefore it is a mismatch and complier doesn't like it. How can I get around this.
thank
Mahen

Mahen
What is the exact message of the compiler?
I think the error is, that the compiler does not find the definition of ON
and OFF. Is it in the same source file?
If not, try to put it into an .h file and include it where you need it.
Stephan
"Mahen" schrieb im Newsbeitrag
news:[email protected]..
> Preprocessor command, assigned the variable and then compare the
> variable to int.
>
> How can I get around this?
>
> #define ON 1
> #define OFF 0
> in seperate code
>
> int variable = ON;
> variable is globally define for that module.
> in seperate code
> if (variable == ON)
> {
>
>
> }
>
> the complier errors off on the if (variable==ON)
> My guess variable is variable in of type int and ON is a preprocessor
> c
ommand. Therefore it is a mismatch and complier doesn't like it. How
> can I get around this.
> thank
> Mahen

Similar Messages

  • My ipad no respond and has a copy cloud and the screen and  I cant do  other  touch accions. how can I  get off this accion?

    my ipad no respond and has a security copy by cloud and the screen and I cant do touch accions and no disapears this accion.

    Try a reset:
    Hold the Sleep and Home button down for about 10 second until you see the Apple logo.

  • I can't remeber my password for i cloud and the email address is no longer active to reset it, how can i get around this

    i can't remember my password for i cloud and the email address is no longer active to reset it, how can i get around this.

    iForgot iCloud Password
    Alternatives for Help Resetting Security Questions and/or Rescue Mail
         1. If you have a valid rescue email address, then use this procedure:
             Rescue email address and how to reset Apple ID security questions.
         2. Fill out and submit this form. Select the topic, Account Security. You must
             have a Rescue Email to use this option.
         3. This is the only option if you do not already have a valid Rescue Email.
             These are telephone numbers for contacting Apple Support in your country.
             Apple ID- Contacting Apple for help with Apple ID account security. Select
             the appropriate country and call. Ask to speak to the Account Security Team.
         4. Account security issues almost always require you to speak directly to an
             Apple representative to securely establish your identity as the account holder.
             You can set it up so that Apple calls you, either immediately or at a time
             convenient to you.
                1. Go to www.apple.com/support.
                2. Choose Contact Support and click Contact Us.
                3. Choose Other Apple ID Topics and choose the appropriate topic for
                    your issue.
                4. Follow the onscreen instructions.
             Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    Your Apple ID: Manage My Apple ID.
                            Apple ID- All about Apple ID security questions.

  • I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    Check the eBay listing. Did it state the device was Activation Locked? If not, then make a claim as Meg stated and get a refund. You will not be able to activate the phone and no one can help you contact the owner, unless that is the person that sold the device. If they cannot remove the phone from their account because it is not theirs, then refund is your route. Even Apple cannot assist with locating the previous owner.

  • Hi all. I am new to iPad and am trying to buy certain apps thru iTunes. I keep getting messages saying "this app is not yet available in the South African store"! which means i am unable to buy it. Why not and how can i get around this. Thanks

    Hi all. I am new to iPad and am trying to buy / download certain apps thru iTunes and or App Store. I have found the apps i want yet I keep getting messages saying "this app is not yet available in the South African store"! which means i am unable to buy it. Why not and how can i get around this? Thanks

    If you see a dialog telling you the app is not avaiable, then it's not available.
    And keep in mind, your credit or debit card credentials must be associated with the same country where you reside.
    "Although you can browse the iTunes Store in any country without being signed in, you can only purchase content from the iTunes Store for your own country. This is enforced via the billing address associated with your credit card or other payment method that you use with the iTunes Store, rather than your actual geographic location."
    From here >  The Complete Guide to Using the iTunes Store | iLounge Article

  • I've logged onto iTunes, but it's asking me security questions because it's a new device, and I'm getting the answers wrong, but iTunes wants to reset but send the new passwords to my ex partners email address how can I get round this.

    I've logged onto iTunes, but it's asking me security questions because it's a new device, and I'm getting the answers wrong, but iTunes wants to reset but send the new passwords to my ex partners email address how can I get round this.

    I believe part of the recovery process is you get an e-mail allowing you to reset questions.  If that e-mail isn't correct either because your son set it up then you really have no option but to ask Apple again.  They are getting strict abotu security and given the number of "My iTunes account got hacked" posts here I can guess why.  They have no way of knowing you really are the owner of the account.  It's like me going to a policeman and saying, "See that car over there?  That is mine, can you open the door for me?" and the police opening it on that basis alone.
    Frequently asked questions about Apple ID - http://support.apple.com/kb/HE37 --> Can I change the answers to the security questions for my Apple ID?  --> Yes. You can change the answers to the security questions provided when you originally signed up for your Apple ID. Go to My Apple ID (http://appleid.apple.com/) and click Manage your account.
    Forgotten security questions - https://discussions.apple.com/message/18402551  and https://discussions.apple.com/message/18625296
    More involved forgotten question issues - https://discussions.apple.com/thread/3961813
    Kappy 09/2012 post about security questions - https://discussions.apple.com/message/19569468
    John Galt's tips (09&11/2012) - https://discussions.apple.com/message/19809294 and https://discussions.apple.com/message/20229239
    If none of the above work, contact iTunes Support at http://www.apple.com/support/itunes/contact/ and follow the instructions to report the issue to the iTunes Store.

  • I'm trying to download itunes 10 but I get to a point in the download and it tells me, "The feature you are trying to use is on a network resource that is unavailable" but I haven't had itunes on my computer for a year now so how can I get around this?

    I'm trying to download itunes 10 but I get to a point in the download and it tells me, "The feature you are trying to use is on a network resource that is unavailable" but I haven't had itunes on my computer for a year now so how can I get around this?

    iTunes.msi
    Perfect, thanks.
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I have an older version of iTunes on my office computer and it will not let me update to the current version without an administrative password. How can I get around this??

    I have an older version of iTunes on my office computer and it will not allow me to upgrade to the newer version without an administrative password. How can I get around this???

    If you have an iBook G4, (PPC) you can't do much.
    But if that is a MacBook (intel) you may be able to
    upgrade the OS X, if the hardware is up to it...
    Since there were about nine different build models
    of MacBook (not powerpc iBook) to identify what
    one you have would be the first step to knowing
    what OS X and RAM upgrades it could use.
    If the computer is not already at OS X 10.6.8,
    it can't go online to get or use OS X 10.7.5. So,
    when you more accurately describe the 'Book,
    detailed information is available.
    When you find the serial number, there is a web
    page that can be used to identify by serial no.
    http://www.powerbookmedic.com/identify-mac-serial.php
    That'd be a first step. Or even the Model number
    which should be visible on the outer case by hinge.
    Good luck & happy computing!

  • I cannot sync my phone because my device is locked and the screen is broken. how can i get around this?

    My screen on my iPhone 5s 16g has broken and i just received a new one in the mail. i want to sync my old phone to iTunes so i can restore my new one, but cannot sync do to the fact that my screen is broken and i am unable to unlock the phone… how can i get around this?

    You don't. If you use a 3rd party to "fix it" or attempt to do it yourself, Apple will reject the return and charge you the full price of the phone as if you had not returned it at all.
    It's too late. You should have been backing up before it failed.

  • Flash CS6 cant open play SWF files without importing and destroying them, how can I get around this?

    Flash CS6 can't open play SWF files without importing and destroying them, how can I get around this?
    I'm just trying to preview an swf file in flash like I have with all previous versions.

    What if my SWF loads external content from an online server?
    Not only does the current flash player prohibit such activity, it doesn't even pop open an error anymore saying there was an error connecting to an online source.
    Normally, I would simply drag the SWF into Flash and all connections would go through.  I could see traces, errors, and experience no issues.
    Now I can't even do that.  So what then?  You have crippled a fundamental use of the program, but THANK GOD we have that deco brush that nobody asked for.
    And for the record, the nature of my work benefits from not necessarily allowing the Flash Player to connect to online content.  The error it pops up?  That's simply another method of error checking that I require.  Updating the Flash Player options is not an option.
    Why would you even remove this key feature from Flash anyways?  It's been there for years ... has the ratio of people importing SWFs (a rather useless gesture in an increasing OOP world) really outweighed the people using Flash as a testing environment that much?

  • I have multiple emails associated with my i phone, but can't get my mac to associate some of the email names because it is associated with other apple id , but it's my id. how can i get around this?

    I have multiple emails associated with my i phone, but can't get my mac to associate some of the email names because it is associated with other apple id , but it's my id. how can i get around this?

    - Try contacting iTunes for the password problem:
    Apple - Support - iTunes - Contact Us
    - For the other problem you can try a reset. Nothing will be lost
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - The next standard thing to do is to download/install a new app but you cant 'do that.
    - Instead, try restoring from backup.

  • I transferred my iTunes library from Window PC to MacBook pro and now I cant play songs that I purchased with an earlier ID and Password.  How can I get around this problem?'t

    I transferred my iTunes library from Window PC to MacBook pro and now I cant play songs that I purchased with an earlier ID and Password.  How can I get around this problem?

    Authorize the computer.
    iTunes Store: About authorization and deauthorization - http://support.apple.com/kb/HT1420 - and another helpful post: https://discussions.apple.com/message/17828050

  • TS4268 I am trying to facetime on my mac but keep getting the message "The server encountered an error processing registration. Please try again later." I have gotten this multiple times. how can I get around this?

    priority:
    I am trying to facetime on my mac but keep getting the message "The server encountered an error processing registration. Please try again later." I have gotten this multiple times. how can I get around this?
    i also have tried downloading "FaceTap" application to get facetime on my ipad and failed too. i thought i failed because i couldnt download latest 6.0 iOS or later. i downloaded latest software update for iOS but was 5.8 I think

    Wait until Apple fix it. See: http://www.apple.com/support/icloud/systemstatus/

  • For some apps it seems impossible to determine the price before, or even after, installing them. How can I get round this?

    For some apps it seems impossible to determine the price before, or even after, installing them. How can I get round this?

    Can you be clearer about what you're seeing?  The price should be clearly stated up front...  Is that not the case?  Note that there may be additional taxes that will increase the final price, and that can't be included in that up-front listed price, since taxes are different everywhere.

  • Have downloaded 5s iPhone. Instructions for activating iCloud gives wrong email address to verify account. How can I get around this problem and get my phone set up with iCloud

    Have downloaded 5s iPhone. Instructions for activating iCloud gives wrong email address to verify account. How can I get around this problem and get my phone set up with iCloud

    elhoseny wrote:
    ... Instructions for activating iCloud gives wrong email address to verify account..
    The Apple ID and Password that was Originally used to Activate the iDevice is required
    If you do not have that information you will not be able to use the Device.
    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818

Maybe you are looking for