char * cipher (how do i use)

This is a discussion on char * cipher (how do i use) within the C++ Programming forums, part of the General Programming Boards category; I am trying to do this assignment for school. We were given a class that we have to use for ...

  1. #1
    System-7
    Join Date
    Nov 2005
    Posts
    65

    char * cipher (how do i use)

    I am trying to do this assignment for school. We were given a class that we have to use for our decryption program. I have created the program without the class first...and then i plan to adapt it to this class. The problem is I have no idea how you use it. I know it is a pointer and that it will hold only one character. Any other examples or ideas on how to use it would be appreciated. Also, I would ask my teacher...but the problem is that the teachers are on strike at the moment and there is no way to contact them.

    Here is the class we were given...there are no methods in it for the moment:
    Code:
    class cCIPHER
    {
    	private:  char * cipher; //encoded text
                          char * plain;  //decoded text
                          int offset;	//decryption key
    	public: 
    }
    If any of you could do like a little example on how to use one of them that would be great.

    Thanks for any help,

    ...Dan

  2. #2
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,399
    Quote Originally Posted by Dan17
    Also, I would ask my teacher...but the problem is that the teachers are on strike at the moment and there is no way to contact them.
    Are you kidding? Ask for your money back. Or, if it's a public school...well, that's what you get when you ask for government education.

    As you've figured out, you can't really use that class yet. I'm guessing it's your job to implement some methods on it? You should do a board search for pointers on pointers, or just check out the FAQ.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    that can't be the entire class... there's no public members for you to use... unless I'm reading it wrong...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  4. #4
    System-7
    Join Date
    Nov 2005
    Posts
    65
    oh i just didnt add them in. I know how to do methods and that I just didnt include that part of the code. I was just a bit unsure on how to use those variables. But i think that FAQ that pianorain posted will help a bit. I've used pointers before it's just we havent gone and used them in a class. I'm unsure how to assign a value to it. If anyone can post an example of that I think that will point me in the right direction.

    Thanks,

    ...Dan

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting Linked Lists
    By DKING89 in forum C Programming
    Replies: 6
    Last Post: 04-09-2008, 07:36 AM
  2. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 01:06 PM
  3. code condensing
    By bcianfrocca in forum C++ Programming
    Replies: 4
    Last Post: 09-07-2005, 09:22 AM
  4. I'm having a problem with data files.
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 05-14-2003, 09:40 PM
  5. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 12:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21