Hello

Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: C++ help needed  (Read 568 times)

Offline QuDDus
  • Taste so gooood!!!!
  • Legendary Member
  • ******
  • Posts: 3545
  • Karma: +10/-0
C++ help needed
« on: February 15, 2004, 11:46:45 AM »
I am doing a project that will calculate the area and perimeter of square, triangle, and cirlce.

What I am having trouble with is this. I need the program to ask the user if he he/she want to selct circle, square of triangle, and then it should ask them to select area or perimeter.

I am thinking a simple console::write statement(select circle)

or something like that if  you know anything about c++ the help would be very thankful.
\"confucious say - he who sleeps with itchy ass wakes up with smelly fingers\".
\"dont trust anything that bleeds for a week and dont die\" - A pimp
\"FF7 was the greatest game ever made!!!\" -MM

Offline PS2_-'_'-_PS2
  • Sore Fingers
  • Hero Member
  • *****
  • Posts: 1729
  • Karma: +10/-0
    • http://
C++ help needed
« Reply #1 on: February 15, 2004, 03:42:57 PM »
Find a forum that specialises in programming languages ur gonna get much more to the point responses most likely, thats what i did when i was ding my computing project last yera. Jus post a question and some dude will reply to it. =]
\"A key to the understanding of all religions is that a god\'s idea of amusement is Snakes and Ladders with greased rungs\"


http://www.purevolume.com/forgettheletterfour

Offline shockwaves
  • Read My Lips
  • Legendary Member
  • ******
  • Posts: 5288
  • Karma: +10/-0
C++ help needed
« Reply #2 on: February 16, 2004, 12:19:43 AM »
Ugh, I know C, and I know java, but I\'m not sure exactly about C++.  

I know in C I would just do a printf asking them to type in the name of the shape, then a scanf that I would prolly have jsut read the first letter, if it\'s just a simple assignment.  If a c, use the circle, etc.  Then the same for area or perimeter.  But I don\'t know if C++ does it the same way.
.::§hockwave§::.

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
C++ help needed
« Reply #3 on: February 16, 2004, 12:39:24 AM »
aww, isn\'t this cute ^_^ I\'ve got a program + the source code that\'ll give you just what you need. take a look:

http://www.sheepsheet.com/_programming/crypto/crypto.htm

it\'s not a simple area finder, but it does demonstrate how the command line console can be used for these sorts of things. I just used a switch statement inside a loop to give the user a choice of one of three options. ^_^

check out the crypt.cpp link on the navbar.

Offline shockwaves
  • Read My Lips
  • Legendary Member
  • ******
  • Posts: 5288
  • Karma: +10/-0
C++ help needed
« Reply #4 on: February 16, 2004, 12:47:37 AM »
Ha, nope, not the same as C at all.  Oh well, I tried :)
.::§hockwave§::.

Offline Avatarr
  • Wise Member

  • Hero Member
  • *****
  • Posts: 1647
  • Karma: +10/-0
    • http://www.sheepsheet.com
C++ help needed
« Reply #5 on: February 16, 2004, 12:50:36 AM »
C++ is the object oriented extension of C. the switch statement isn\'t even an object oriented thingamabob. I\'m purdy sure it\'s in C. purdy much everything in C++ is in C, except support for classes.

Offline shockwaves
  • Read My Lips
  • Legendary Member
  • ******
  • Posts: 5288
  • Karma: +10/-0
C++ help needed
« Reply #6 on: February 16, 2004, 12:55:52 AM »
Well, I\'m pretty new to C.  So that\'s prolly why.  I did a similar assignment to the one he\'s talking about in C, so I was just saying how I tackled it.  So odds are you\'re right :)
.::§hockwave§::.

Offline QuDDus
  • Taste so gooood!!!!
  • Legendary Member
  • ******
  • Posts: 3545
  • Karma: +10/-0
C++ help needed
« Reply #7 on: February 16, 2004, 02:26:05 AM »
thanks avatarr.

Shockwave I am using visual studio and microsoft has completely change alot of the coding in visual studio we don\'t have to use printf anymore.
« Last Edit: February 16, 2004, 02:27:34 AM by QuDDus »
\"confucious say - he who sleeps with itchy ass wakes up with smelly fingers\".
\"dont trust anything that bleeds for a week and dont die\" - A pimp
\"FF7 was the greatest game ever made!!!\" -MM

Offline shockwaves
  • Read My Lips
  • Legendary Member
  • ******
  • Posts: 5288
  • Karma: +10/-0
C++ help needed
« Reply #8 on: February 16, 2004, 08:36:15 AM »
Oh, well, rock then :)  I\'m glad you got it though.
.::§hockwave§::.

 

SMF spam blocked by CleanTalk