CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Beginning C++

  1. #1
    Join Date
    Jun 2011
    Posts
    1

    Beginning C++

    I am beginning to code in C++ and got an assignment from school. I need some help and direction on how to go about this.

    I have an input file input.txt and each line contains 5 nonempty strings separated by white spaces. I need to give a C++ function to verify if the total number of characters of every line is smaller or equal to 65.

    Thanks

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Beginning C++

    Quote Originally Posted by dkbose View Post
    I am beginning to code in C++ and got an assignment from school. I need some help and direction on how to go about this.
    What specific problem are you having?

    I have an input file input.txt and each line contains 5 nonempty strings separated by white spaces.
    Do you know how to open a file? Read a file? String handling? What exactly are you having trouble with?

    You also need to show what code you have, or you'll get the patented Skizmo click as a response:

    http://www.codeguru.com/forum/showpo...83&postcount=2

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; June 5th, 2011 at 02:48 PM.

  3. #3
    Join Date
    Mar 2010
    Location
    Melbourne Australia
    Posts
    454

    Re: Beginning C++

    Can I just say I can give you that answer , however if I do you will never learn , as a rule discover it yourself is more fun and stays with you , than someone telling you.

  4. #4
    Join Date
    Mar 2010
    Location
    Melbourne Australia
    Posts
    454

    Re: Beginning C++

    you can start with,
    unsigned char and std::fstream

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured