Reading Strings and Conversion

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 357 Views - Last Post: 03 February 2012 - 07:40 AM Rate Topic: -----

Topic Sponsor:

#16 tlhIn`toq  Icon User is offline

  • WillMyCodeWork = !FailedWhenYouTriedIt;
  • member icon

Reputation: 3290
  • View blog
  • Posts: 6,896
  • Joined: 02-June 10

Re: Reading Strings and Conversion

Posted 02 February 2012 - 08:03 PM

I will make this suggestion though...

If you have 4 months of C++ use that to your advantage. That should have taught you how to think in a logical and programatic manner.

The logic of solving this is no different between C++ and C#. Its just minor syntax differences.

So write the project up in C++ first. Use what you know. Then translate it to C#.
Was This Post Helpful? 0
  • +
  • -

#17 AdamSpeight2008  Icon User is offline

  • Coder-ian
  • member icon

Reputation: 1401
  • View blog
  • Posts: 7,358
  • Joined: 29-May 08

Re: Reading Strings and Conversion

Posted 02 February 2012 - 08:19 PM

Quote

I did c++ before,

Really?! Did you fail?

Programming is mainly thinking a solving problems.

Problem Solving (3-Step Solution)

  • Has my problem been seen before?
    Yes: What solutions are there?
    Research
  • Has so sub-set of my problem been seen before?
    Yes: What solutions are there?
    Research
  • How can I use the solutions to solve my problem?
    Research & Experimentation


Understand what type thing return also helps.

Indexing on a string returns char. String [ Integer ] -> Char
eg:- Char c = myString[0];

So does Char have any method that check the Case of a char?
Was This Post Helpful? 0
  • +
  • -

#18 Upstate518  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 02-February 12

Re: Reading Strings and Conversion

Posted 02 February 2012 - 08:27 PM

I was just looking for some help, take it easy. Just because i havent coded that long doesnt mean you have to sit here and bash me.
Was This Post Helpful? 0
  • +
  • -

#19 AdamSpeight2008  Icon User is offline

  • Coder-ian
  • member icon

Reputation: 1401
  • View blog
  • Posts: 7,358
  • Joined: 29-May 08

Re: Reading Strings and Conversion

Posted 02 February 2012 - 08:33 PM

That maybe so, but we expect someone who is at College to have the basic research skills down. That extends beyond be able to do a Google search.
Was This Post Helpful? 1
  • +
  • -

#20 peace_fixation  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 69
  • Joined: 01-November 11

Re: Reading Strings and Conversion

Posted 03 February 2012 - 07:40 AM

Your basic operation is extracting a character from your string by referencing the position (as Adam said above)

char c = myString[0]


and then you need to check whether it is an uppercase or lowercase letter. You can use the ASCII Table to do this, and writing your own function to do it will be a profitable exercise. It's a very small function!
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2