Announcement

Collapse
No announcement yet.

C++

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • C++

    I can't debug this code,
    Can someone help me please?

    My aol s/n is opicestorm

    i.m me or respond to this thread.

    Thanks

    http://pastebin.com/714338

    Alot of the code, is code from my last program and doesnt matter.

    http://hornetsnest.sunybroome.edu/ro...8/cookies.html

    once u submit that, it runs the program.

    It's suppose to display the name and color..


    1:delta> personally, i would not go to war for oil
    1:FarScape> in age of empires you would
    1:Freeze> LOL FAR
    ---
    5:waven> freeze
    5:waven> no one talks to ease directly
    5:waven> you state your business with sanji
    5:waven> he will relay it to phizey
    5:waven> phizey will relay it to me
    5:waven> and i will talk to ease
    5:Freeze> LOL
    5:waven> that's how things work around here
    --
    1:renzi> freeze theres difference between being wasted and being a waste

  • #2
    I don't remember much c++ but a quick glance at the code makes me suspect a problem with your pointers. See if the code on lines 105 -118 set what you think it sets.
    SIGNATURE PROTEST: KEEP THE SHORT FFS

    Comment


    • #3
      So.. how come you're using char*'s for strings, if you're coding in C++?

      Also, on lines 146-174, it would probably be more appropriate to use a case/switch instead of a bunch of if/elses.

      Try replacing lines 109, 113, and 117 with strcpy/strncpy's, or replacing your char *'s with actual C++ strings (yknow, the stl objects ).

      Comment

      Working...
      X