Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming Help

  1. Mar 12, 2006 #1
    I am having trouble with this in C++
    Code (Text):

      while(k < bodyCopy.size())
          bodyCopy[k] = tolower(bodyCopy[k]);
          if (please='<')
          if (inTag==1)
          if (please=='>')
          k = k + 1;
    Its supose to replace any thing in string body.Copy between < > with periods but leave everything else alone
    currently it changes everything in body.Copy to periods
    any idea why??
  2. jcsd
  3. Mar 12, 2006 #2
    If it would help I would post my entire code but I have a feeling that might confuse more then help solve this problem
  4. Mar 12, 2006 #3
    cuz you need to use the boolean operator not the assignment operator in your "if" statement, very common mistake, i hate making that error.

    also some of the code seems unnecessary unless that was your debugging technique.
  5. Mar 12, 2006 #4
    Thank you for eyes...

    I can't believe I missed that...

    now only one problem left
  6. Mar 12, 2006 #5


    User Avatar

    Staff: Mentor

    I guess you must not have noticed that the next forum down, "Computers", has a sub-forum named "Programming." :smile:
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Programming Help
  1. Programming help (Replies: 2)

  2. Programing help (Replies: 8)

  3. Help with programming (Replies: 5)