pointers

This is a discussion on pointers within the C++ Programming forums, part of the General Programming Boards category; hi please can anyone give me ahint how to do this? 1.write a program that mixes two strings using pointers. ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    38

    pointers

    hi

    please can anyone give me ahint how to do this?

    1.write a program that mixes two strings using pointers. for example:
    inputs:
    Blue
    Sky
    the output:
    BSlkuye

    2.write a program that counts the number of characters in a string using pointers.
    please set free our POWs

  2. #2
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    kuwait,
    I think you know how to do the same think vVv wrote, in C++, don't you?

    ::Edit::
    Just in case you don't:
    replace:
    Code:
    puts( result );
    with:
    Code:
    cout << result;
    and:
    Code:
    printf( "%d characters\n", p1 - result );
    with:
    Code:
    cout << p1-result << " Characters."<<endl;
    Last edited by ammar; 12-23-2002 at 01:57 AM.
    none...

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    38

    ?

    thanx for your help


    but it doesn't work can anyone please tell me how to solve these two problems?

  4. #4
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    Umm I could be missing something, but it might help if you were a wee bit more descriptive in your questions. I would try asking them.
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    38
    1.write a program that mixes two strings using pointers. for example:
    inputs:
    Blue
    Sky
    the output:
    BSlkuye

    2.write a program that counts the number of characters in a string using pointers.


    __________________

  6. #6
    Neoseeker's master master2000's Avatar
    Join Date
    Dec 2002
    Posts
    101
    do it your self, this board is not a " i'll just sit on my well exsersized bum and have every body do the work"
    you actually have to DO sumthing .
    missles on metriods

  7. #7
    _ Munkey01's Avatar
    Join Date
    Dec 2002
    Posts
    280
    Woa, calm down man. He didnt ask you to do it for him, he asked how would he solce the problems. But I think he ment to press the "new post" button but accidently hit the "new thread" button.

    Maybe if we could see the code and we could see what errors you were getting we could be of some assistance.

  8. #8
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Threads merged...
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  9. #9
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    that code is working with me, I think you have to copy and paste it correctly
    none...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  2. function pointers
    By benhaldor in forum C Programming
    Replies: 4
    Last Post: 08-19-2007, 10:56 AM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 12:18 PM

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