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. 1 day only! I will answer your beginner home-work assignments!

1 day only! I will answer your beginner home-work assignments!

Scheduled Pinned Locked Moved C / C++ / MFC
learning
11 Posts 7 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.
  • T Offline
    T Offline
    Terry ONolley
    wrote on last edited by
    #1

    PLEASE DISREGARD THIS POST - I WAS ONLY JOKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



    R A C A 4 Replies Last reply
    0
    • T Terry ONolley

      PLEASE DISREGARD THIS POST - I WAS ONLY JOKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



      R Offline
      R Offline
      Ryan_Roberts
      wrote on last edited by
      #2

      Hmm

      Whois Server Version 1.3

      Domain names in the .com and .net domains can now be registered
      with many different competing registrars. Go to http://www.internic.net
      for detailed information.

      No match for "PROGRAMMINGHOMEWORK.COM".

      It might just work. A mate of mine from university set up www.cheathouse.com[^]. Makes a packet out of it too. Ryan "Everybody has a right to be stupid, but some people abuse the privilege." Uncle Joe Stalin

      T 1 Reply Last reply
      0
      • T Terry ONolley

        PLEASE DISREGARD THIS POST - I WAS ONLY JOKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Ok, I'll take you up on it. I've *very* new at this and assume the question is trivial, but can't seem to figure out how to get the documentation to tell me what I want to know. I need to read a string and, if it's a number, convert it to double. How do I tell whether the string (input via the Console::ReadLine() method) contains only numeric characters (and can therefor be correctly converted to double via the Convert::ToDouble() method) or not? If this turns out not to be trivial, just let me know and I'll think of something else. Maybe get a stream of chars or something (yuck!)

        T M D 3 Replies Last reply
        0
        • A Anonymous

          Ok, I'll take you up on it. I've *very* new at this and assume the question is trivial, but can't seem to figure out how to get the documentation to tell me what I want to know. I need to read a string and, if it's a number, convert it to double. How do I tell whether the string (input via the Console::ReadLine() method) contains only numeric characters (and can therefor be correctly converted to double via the Convert::ToDouble() method) or not? If this turns out not to be trivial, just let me know and I'll think of something else. Maybe get a stream of chars or something (yuck!)

          T Offline
          T Offline
          Terry ONolley
          wrote on last edited by
          #4

          Your question sounds like a sincere request for advice - and I would gladly answer it if I could - but I am only familiar with MFC and C++ - I think your question is either .NET, JAVA or C# (I have no idea).



          D 1 Reply Last reply
          0
          • T Terry ONolley

            PLEASE DISREGARD THIS POST - I WAS ONLY JOKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



            C Offline
            C Offline
            Chris Maunder
            wrote on last edited by
            #5

            If you wish to buy some advertising then please contact marketing@codeproject.com. Advertising in this way is, unfortunately, unacceptable. cheers, Chris Maunder

            T 1 Reply Last reply
            0
            • A Anonymous

              Ok, I'll take you up on it. I've *very* new at this and assume the question is trivial, but can't seem to figure out how to get the documentation to tell me what I want to know. I need to read a string and, if it's a number, convert it to double. How do I tell whether the string (input via the Console::ReadLine() method) contains only numeric characters (and can therefor be correctly converted to double via the Convert::ToDouble() method) or not? If this turns out not to be trivial, just let me know and I'll think of something else. Maybe get a stream of chars or something (yuck!)

              M Offline
              M Offline
              Mike Danberg
              wrote on last edited by
              #6

              Even though this isn't C/C++ like Terry said, you can still use this same method that I'd use. Write a function that checks each character to see if it is a number or not. Return true if its a number and false if not. If it reaches the end of the string without returning false, then it converts it double, else it fails. Two ways I can think of to do this. One is just check the char is equal to any number 0-9 (this probably isn't the most effective way) or convert to ascii and check if it is within the ascii range for a number. Mike

              1 Reply Last reply
              0
              • C Chris Maunder

                If you wish to buy some advertising then please contact marketing@codeproject.com. Advertising in this way is, unfortunately, unacceptable. cheers, Chris Maunder

                T Offline
                T Offline
                Terry ONolley
                wrote on last edited by
                #7

                Code-Project would accept sponsors whose product was selling homework completion for students?!?!?!?!? :) :) I guess so, or you wouldn't have referred my joke to your ad dept - or was that in itself a joke??!??! I am so confused! Anyways, I was just joking. Have a cheerful day!



                1 Reply Last reply
                0
                • R Ryan_Roberts

                  Hmm

                  Whois Server Version 1.3

                  Domain names in the .com and .net domains can now be registered
                  with many different competing registrars. Go to http://www.internic.net
                  for detailed information.

                  No match for "PROGRAMMINGHOMEWORK.COM".

                  It might just work. A mate of mine from university set up www.cheathouse.com[^]. Makes a packet out of it too. Ryan "Everybody has a right to be stupid, but some people abuse the privilege." Uncle Joe Stalin

                  T Offline
                  T Offline
                  Terry ONolley
                  wrote on last edited by
                  #8

                  I was just kidding. Maybe someone would be willing to put something together to make some $$$.



                  1 Reply Last reply
                  0
                  • T Terry ONolley

                    Your question sounds like a sincere request for advice - and I would gladly answer it if I could - but I am only familiar with MFC and C++ - I think your question is either .NET, JAVA or C# (I have no idea).



                    D Offline
                    D Offline
                    David Stone
                    wrote on last edited by
                    #9

                    Terry O`Nolley wrote: but I am only familiar with MFC and C++ - I think your question is either .NET, JAVA or C# (I have no idea). No...it's C++ with managed extensions :)


                    When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                    1 Reply Last reply
                    0
                    • A Anonymous

                      Ok, I'll take you up on it. I've *very* new at this and assume the question is trivial, but can't seem to figure out how to get the documentation to tell me what I want to know. I need to read a string and, if it's a number, convert it to double. How do I tell whether the string (input via the Console::ReadLine() method) contains only numeric characters (and can therefor be correctly converted to double via the Convert::ToDouble() method) or not? If this turns out not to be trivial, just let me know and I'll think of something else. Maybe get a stream of chars or something (yuck!)

                      D Offline
                      D Offline
                      David Stone
                      wrote on last edited by
                      #10

                      You could look at the System::Text::RegularExpressions namespace and create a regular expression that would match the characters 0-9...then check to see if the thing is a match. You could also use the Microsoft::VisualBasic namespace X| and the IsNumeric() function. Also, I think the Convert::ToDouble() throws an exception if the input string is not in a proper format. (Actually I know so, I just did this the other day in C#). You could wrap the call to ToDouble() in a try catch block and handle the error whichever way you want. Hope that helps... :)


                      When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?" -Hockey on being a geek

                      1 Reply Last reply
                      0
                      • T Terry ONolley

                        PLEASE DISREGARD THIS POST - I WAS ONLY JOKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



                        A Offline
                        A Offline
                        Alex Dolpfin
                        wrote on last edited by
                        #11

                        What fun!!! :(

                        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