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. General Programming
  3. C / C++ / MFC
  4. A simple question,can anybody answer me?

A simple question,can anybody answer me?

Scheduled Pinned Locked Moved C / C++ / MFC
question
8 Posts 5 Posters 0 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.
  • A Offline
    A Offline
    Angel Kid
    wrote on last edited by
    #1

    I wrote the codes: #include void main() { int flag=0; int i,j,k; for(i=2;i>3;i++) { for(j=0;j>9;j++) { for(k=0;k>9;k++) { if(i+j+k==12&&i*j*k==42) {flag=1; cout<

    A J C A 4 Replies Last reply
    0
    • A Angel Kid

      I wrote the codes: #include void main() { int flag=0; int i,j,k; for(i=2;i>3;i++) { for(j=0;j>9;j++) { for(k=0;k>9;k++) { if(i+j+k==12&&i*j*k==42) {flag=1; cout<

      A Offline
      A Offline
      Angel Kid
      wrote on last edited by
      #2

      sorry , I forgot the header #include but the problem still in

      N 1 Reply Last reply
      0
      • A Angel Kid

        sorry , I forgot the header #include but the problem still in

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

        Actually you didnt forget the header. The < and > are taken as html tags. Tick the no-html check box and re-post it. Also put it as pre tagged. Nish Nish was here, now Nish has gone; He left his soul, to turn you on; Those who knew Nish, knew him well; Those who didn't, can go to hell. I like to :jig: on the Code Project Sonork ID 100.9786 voidmain www.busterboy.org

        1 Reply Last reply
        0
        • A Angel Kid

          I wrote the codes: #include void main() { int flag=0; int i,j,k; for(i=2;i>3;i++) { for(j=0;j>9;j++) { for(k=0;k>9;k++) { if(i+j+k==12&&i*j*k==42) {flag=1; cout<

          J Offline
          J Offline
          Jon Hulatt
          wrote on last edited by
          #4

          Your linker error is not really anything to do with your code. i suspect that either cl.exe is missing, broken, or not in the PATH. One observation of your code though,

          for(i=2;i>3;i++)

          means that your code actually won't run. every time execution meets the for statement, it evaluates your condition (i>3) and only continues if it is True. On the first iteration, i=2. Therefore, i>3 is false, and it will skip the entire for {..} block. Note that this is not the cause of your linker error, just a problem i noticed. Sorry to dissapoint you all with my lack of a witty or poignant signature.

          A 1 Reply Last reply
          0
          • J Jon Hulatt

            Your linker error is not really anything to do with your code. i suspect that either cl.exe is missing, broken, or not in the PATH. One observation of your code though,

            for(i=2;i>3;i++)

            means that your code actually won't run. every time execution meets the for statement, it evaluates your condition (i>3) and only continues if it is True. On the first iteration, i=2. Therefore, i>3 is false, and it will skip the entire for {..} block. Note that this is not the cause of your linker error, just a problem i noticed. Sorry to dissapoint you all with my lack of a witty or poignant signature.

            A Offline
            A Offline
            Angel Kid
            wrote on last edited by
            #5

            Jon Hulatt wrote: One observation of your code though, for(i=2;i>3;i++) means that your code actually won't run. every time execution meets the for statement, it evaluates your condition (i>3) and only continues if it is True. YES,you are right. the right codes are that: for(i=2;i<=3;i++); I forgot that,thanks for your help.

            1 Reply Last reply
            0
            • A Angel Kid

              I wrote the codes: #include void main() { int flag=0; int i,j,k; for(i=2;i>3;i++) { for(j=0;j>9;j++) { for(k=0;k>9;k++) { if(i+j+k==12&&i*j*k==42) {flag=1; cout<

              C Offline
              C Offline
              Carlos Antollini
              wrote on last edited by
              #6

              Alpha_No1 wrote: Error spawning cl.exe What is the error code? Regards.... Carlos Antollini. Sonork ID 100.10529 cantollini

              1 Reply Last reply
              0
              • A Angel Kid

                I wrote the codes: #include void main() { int flag=0; int i,j,k; for(i=2;i>3;i++) { for(j=0;j>9;j++) { for(k=0;k>9;k++) { if(i+j+k==12&&i*j*k==42) {flag=1; cout<

                A Offline
                A Offline
                Atul Dharne
                wrote on last edited by
                #7

                Here cl.exe is the MS 32-bit C/C++ compiler. The reason for the error may be that the path to this compiler has not been set. Go to Tools -> Options -> Directories in your VC IDE and check your paths to Executable Files. The cl.exe file is normally in your bin directory. Atul Sonork 100.13714 netdiva

                A 1 Reply Last reply
                0
                • A Atul Dharne

                  Here cl.exe is the MS 32-bit C/C++ compiler. The reason for the error may be that the path to this compiler has not been set. Go to Tools -> Options -> Directories in your VC IDE and check your paths to Executable Files. The cl.exe file is normally in your bin directory. Atul Sonork 100.13714 netdiva

                  A Offline
                  A Offline
                  Angel Kid
                  wrote on last edited by
                  #8

                  Thank you,I have solved the problem.I reinstalled the VC++.

                  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