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. General Programming
  3. C / C++ / MFC
  4. Building own String class

Building own String class

Scheduled Pinned Locked Moved C / C++ / MFC
c++comlearning
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
    KernKraft33
    wrote on last edited by
    #1

    (There's probably a thread like this one every day so... sorry!) I'm working on a project in which I want to rely only on my own code so therefore I have to go through the pains of writing my own String class. I am a C++ programmer at beginner/intermediate level so there might be some very flagrant errors in there. This is what I have so far: Declaration Definition Any suggestions would be appreciated!

    A 1 Reply Last reply
    0
    • K KernKraft33

      (There's probably a thread like this one every day so... sorry!) I'm working on a project in which I want to rely only on my own code so therefore I have to go through the pains of writing my own String class. I am a C++ programmer at beginner/intermediate level so there might be some very flagrant errors in there. This is what I have so far: Declaration Definition Any suggestions would be appreciated!

      A Offline
      A Offline
      Andrew Peace
      wrote on last edited by
      #2

      Whilst I haven't looked at your code, I would suggest seriously considering whether it is worth writing your own string class, given that there are a million implementations of it already both in the standard C++ libraries and on the 'net. Strings are funny because they're succeptible to buffer overflow errors all over the place so if you do implement your own string class, this is something you will have to be very careful of. Alternatively, the std::string class from the STl has this all done already. Just a suggestion... -- Andrew.

      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