Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A Question about compilation

A Question about compilation

Scheduled Pinned Locked Moved The Lounge
question
10 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Roger Wright new
    wrote on last edited by
    #1

    Why does this compile in Arizona, but not California or New York?

    #include <Constitution>//Includes Rights.h as well
    #include <stdio>

    CObject CGunControl(CHandgun pstl, CTarget trgt)
    { CGunControl::CGunCOntrol(pstl, trgt)
    {CGunControl,CreateObject(gc);
    }
    public boolean practice(pstl, trgt)
    {int i;
    for(i=0;i<5;i++)
    {pstl.aim("center");
    pstl.squeezeTrigger(1);
    }
    if(trgt.inTenRing !=5)
    {trgt.reset();
    pstl.reload(5);
    return(False);
    }
    else
    {return(True);
    }
    }
    public void main()
    {CHandGun pistol = new(CHandGun);
    pistol.load(5);//Initialize Pistol
    CTarget target = new(CTarget);
    target.reset;//Initialize Target
    CGunControl gc = new(CGunControl);
    while(!gc.practice(pistol,target));
    cout << "Finally!";
    return(0);
    }

    Always be a straight shooter, and the Dean of Men will drop like a rock... - old bumper sticker from the '70s

    C N 2 Replies Last reply
    0
    • R Roger Wright new

      Why does this compile in Arizona, but not California or New York?

      #include <Constitution>//Includes Rights.h as well
      #include <stdio>

      CObject CGunControl(CHandgun pstl, CTarget trgt)
      { CGunControl::CGunCOntrol(pstl, trgt)
      {CGunControl,CreateObject(gc);
      }
      public boolean practice(pstl, trgt)
      {int i;
      for(i=0;i<5;i++)
      {pstl.aim("center");
      pstl.squeezeTrigger(1);
      }
      if(trgt.inTenRing !=5)
      {trgt.reset();
      pstl.reload(5);
      return(False);
      }
      else
      {return(True);
      }
      }
      public void main()
      {CHandGun pistol = new(CHandGun);
      pistol.load(5);//Initialize Pistol
      CTarget target = new(CTarget);
      target.reset;//Initialize Target
      CGunControl gc = new(CGunControl);
      while(!gc.practice(pistol,target));
      cout << "Finally!";
      return(0);
      }

      Always be a straight shooter, and the Dean of Men will drop like a rock... - old bumper sticker from the '70s

      C Offline
      C Offline
      ColinDavies
      wrote on last edited by
      #2

      Is CGunControl derived from CWnd or are you using the 3rd party CStatutes Class stuff, My compiler still doesn't handle type Bool So I can't return True Oh yeah please post this kinda techo question in the appropriate forums for the best responses. :-) Regardz Colin J Davies

      Sonork ID 100.9197:Colin

      I live in Bob's HungOut now

      A good example of "Fully Managed" coding

      N R 2 Replies Last reply
      0
      • R Roger Wright new

        Why does this compile in Arizona, but not California or New York?

        #include <Constitution>//Includes Rights.h as well
        #include <stdio>

        CObject CGunControl(CHandgun pstl, CTarget trgt)
        { CGunControl::CGunCOntrol(pstl, trgt)
        {CGunControl,CreateObject(gc);
        }
        public boolean practice(pstl, trgt)
        {int i;
        for(i=0;i<5;i++)
        {pstl.aim("center");
        pstl.squeezeTrigger(1);
        }
        if(trgt.inTenRing !=5)
        {trgt.reset();
        pstl.reload(5);
        return(False);
        }
        else
        {return(True);
        }
        }
        public void main()
        {CHandGun pistol = new(CHandGun);
        pistol.load(5);//Initialize Pistol
        CTarget target = new(CTarget);
        target.reset;//Initialize Target
        CGunControl gc = new(CGunControl);
        while(!gc.practice(pistol,target));
        cout << "Finally!";
        return(0);
        }

        Always be a straight shooter, and the Dean of Men will drop like a rock... - old bumper sticker from the '70s

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #3

        I think this question should be asked in the .NET forum! Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut

        R 1 Reply Last reply
        0
        • C ColinDavies

          Is CGunControl derived from CWnd or are you using the 3rd party CStatutes Class stuff, My compiler still doesn't handle type Bool So I can't return True Oh yeah please post this kinda techo question in the appropriate forums for the best responses. :-) Regardz Colin J Davies

          Sonork ID 100.9197:Colin

          I live in Bob's HungOut now

          A good example of "Fully Managed" coding

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Colin I jus found out that td and tr tags dont work. See below :- Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut

          C 1 Reply Last reply
          0
          • N Nish Nishant

            Colin I jus found out that td and tr tags dont work. See below :- Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut

            C Offline
            C Offline
            ColinDavies
            wrote on last edited by
            #5

            This is intersting Nish, Lets think up some ways of exploiting it before Chris finds out, :-) Suggestions ?

            Regardz Colin J Davies

            Sonork ID 100.9197:Colin

            I live in Bob's HungOut now

            A good example of "Fully Managed" coding

            N 1 Reply Last reply
            0
            • C ColinDavies

              This is intersting Nish, Lets think up some ways of exploiting it before Chris finds out, :-) Suggestions ?

              Regardz Colin J Davies

              Sonork ID 100.9197:Colin

              I live in Bob's HungOut now

              A good example of "Fully Managed" coding

              N Offline
              N Offline
              Nish Nishant
              wrote on last edited by
              #6

              We could post a tutorial and teach people about the use of and

              It'll be easy as we can type in

              without having to use & and lt and ; :-) Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut

              C 1 Reply Last reply
              0
              • N Nish Nishant

                We could post a tutorial and teach people about the use of and

                It'll be easy as we can type in

                without having to use & and lt and ; :-) Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut

                C Offline
                C Offline
                ColinDavies
                wrote on last edited by
                #7

                Hmmm not exactly what I was thinking Nish, But its good to see you are thinking and not asleep. :-) Regardz Colin J Davies

                Sonork ID 100.9197:Colin

                I live in Bob's HungOut now

                A good example of "Fully Managed" coding

                1 Reply Last reply
                0
                • C ColinDavies

                  Is CGunControl derived from CWnd or are you using the 3rd party CStatutes Class stuff, My compiler still doesn't handle type Bool So I can't return True Oh yeah please post this kinda techo question in the appropriate forums for the best responses. :-) Regardz Colin J Davies

                  Sonork ID 100.9197:Colin

                  I live in Bob's HungOut now

                  A good example of "Fully Managed" coding

                  R Offline
                  R Offline
                  Roger Wright
                  wrote on last edited by
                  #8

                  Colin Davies wrote: My compiler still doesn't handle type Bool The rednecks here see everything in absolutes, so all matters are either True or False - no shades of grey. For some reason, that seems to make all languages accept boolean types. I suspect that Microsoft, in its collective wisdom, ships a special version of the compiler to this state. That would certainly explain why it only compiles here:) Colin Davies wrote: Oh yeah please post this kinda techo question in the appropriate forums for the best responses. Being a lame joke, rather than an actual program, this seemed the better place to post it...

                  C 1 Reply Last reply
                  0
                  • N Nish Nishant

                    I think this question should be asked in the .NET forum! Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut

                    R Offline
                    R Offline
                    Roger Wright
                    wrote on last edited by
                    #9

                    I can't - VS.Net isn't compatible with VS.AZ - No Bool data type, as Colin pointed out... My mind's made up; don't bother me with facts!

                    1 Reply Last reply
                    0
                    • R Roger Wright

                      Colin Davies wrote: My compiler still doesn't handle type Bool The rednecks here see everything in absolutes, so all matters are either True or False - no shades of grey. For some reason, that seems to make all languages accept boolean types. I suspect that Microsoft, in its collective wisdom, ships a special version of the compiler to this state. That would certainly explain why it only compiles here:) Colin Davies wrote: Oh yeah please post this kinda techo question in the appropriate forums for the best responses. Being a lame joke, rather than an actual program, this seemed the better place to post it...

                      C Offline
                      C Offline
                      ColinDavies
                      wrote on last edited by
                      #10

                      Roger Wright wrote: The rednecks here see everything in absolutes, so all matters are either True or False - no shades of grey. For some reason, that seems to make all languages accept boolean types. I suspect that Microsoft, in its collective wisdom, ships a special version of the compiler to this state. That would certainly explain why it only compiles here Ah Ok, I think we have discovered the mystery then Roger, most of these sort of problems have simple solutions etc, And I think we have found it. Roger Wright wrote: Colin Davies wrote: Oh yeah please post this kinda techo question in the appropriate forums for the best responses. Being a lame joke, rather than an actual program, this seemed the better place to post it... Roger my "appropriate forums" comment was my attempt at a lame joke. :-) Regardz Colin J Davies

                      Sonork ID 100.9197:Colin

                      I live in Bob's HungOut now

                      A good example of "Fully Managed" coding

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups