New to C++

Hello :) I am in Computing Science 160 and need to do a C++ assignment. I need a program that reads in user input of strings (ex. PTLPPDNQL*) and stopping when a * is read. It then needs to read each letter as a value (P = pennie or 1 cent, T = toonie or 200 cents, etc). This is the part I need help with. Do I need to use an if or while statement or something like that? I started with this, but not sure what to do now: