Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Help needed! - Confused by char **

Help needed! - Confused by char **

Scheduled Pinned Locked Moved IT & Infrastructure
c++helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karl jones
    wrote on last edited by
    #1

    Hello, I'm fairly new to C++. I have come a cross a definition in the form: void SetChoices(char ** ppszItemsText, UINT nNumItems); If I understand char ** correctly it is a pointer to a string pointer. I'm trying to set up a list of strings that will fit into char **. Can anyone help me? All my attempts fail terribly. THanks Karl

    S 1 Reply Last reply
    0
    • K karl jones

      Hello, I'm fairly new to C++. I have come a cross a definition in the form: void SetChoices(char ** ppszItemsText, UINT nNumItems); If I understand char ** correctly it is a pointer to a string pointer. I'm trying to set up a list of strings that will fit into char **. Can anyone help me? All my attempts fail terribly. THanks Karl

      S Offline
      S Offline
      Shinde Vikram
      wrote on last edited by
      #2

      well karl i think so your are confused with the pointers it is a very small concept of rows and columns:-O do the following steps firstly define a char ** for ex. char ** a; then allocate the memory which you needed for ex. a = new char[10]; i.e. firstly allocate the number of rows i.e. how many strings you want to store then allocate the memory for what will be the size of each string for ex. for (int i=0; i < 50; i++) a[i] = new char[50]; i.e. allocate the memory for each columns ok so simple try it out and mail me back hope so this will solve your problem i m a student of M. Sc. Computer Science from khopoli wanna any information regarding the VC++ and VB ? specialization on Message Digest Security

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups