Click here to Skip to main content
15,887,350 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Passing a variable Pin
David Crow24-Jul-06 8:05
David Crow24-Jul-06 8:05 
AnswerRe: Passing a variable Pin
prasad_som24-Jul-06 19:00
prasad_som24-Jul-06 19:00 
Questioncin issues [modified] Pin
Harold_Wishes24-Jul-06 6:52
Harold_Wishes24-Jul-06 6:52 
AnswerRe: cin issues Pin
David Crow24-Jul-06 6:54
David Crow24-Jul-06 6:54 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 7:07
Harold_Wishes24-Jul-06 7:07 
QuestionRe: cin issues Pin
David Crow24-Jul-06 7:52
David Crow24-Jul-06 7:52 
AnswerRe: cin issues Pin
Harold_Wishes24-Jul-06 8:08
Harold_Wishes24-Jul-06 8:08 
GeneralRe: cin issues Pin
David Crow24-Jul-06 8:32
David Crow24-Jul-06 8:32 
Sans the comments, and extraneous code, this should get you real close:

void add_number_of_subunits (int& data)
{
    string buff;
     
    do
    { 	
        cout << endl;
        cout << "Please enter number of subunits: ";
        cin >> buff; 
		
    } while (atoi(buff.c_str()) < 1 || atoi(buff.c_str()) > 12);	
 
    data = atoi(buff.c_str()); 
}
 
void add_node_at_end(_data& item, int& increment)
{    
    string buffer;
 
    cout << "Please enter the length of the protein sequence for Subunit " << increment << "> ";
    cin >> buffer;
 
    item.Length = buffer;
 
    cout << "Please enter the protein sequence for Subunit " << increment << "> ";
    cin >> buffer;
 
    item.Sequence = buffer;
    item.number = item.Sequence.size();
 
    cout << "Enter brief status on the presence of a modified N_Terminal: ";
    cin >> buffer;
    item.N_Terminal = buffer;
 
    cout << "Enter brief status on the presence of a modified C_Terminal: ";
    cin >> buffer;
    item.C_Terminal = buffer;
 
    cout << endl;
	
    increment++;
}



"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

"Judge not by the eye but by the heart." - Native American Proverb


GeneralRe: cin issues Pin
Zac Howland24-Jul-06 9:13
Zac Howland24-Jul-06 9:13 
GeneralRe: cin issues Pin
David Crow24-Jul-06 9:22
David Crow24-Jul-06 9:22 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 9:30
Zac Howland24-Jul-06 9:30 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 9:28
Harold_Wishes24-Jul-06 9:28 
GeneralRe: cin issues Pin
Harold_Wishes24-Jul-06 9:23
Harold_Wishes24-Jul-06 9:23 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 9:34
Zac Howland24-Jul-06 9:34 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 10:07
Harold_Wishes24-Jul-06 10:07 
GeneralRe: cin issues Pin
Zac Howland24-Jul-06 11:08
Zac Howland24-Jul-06 11:08 
GeneralRe: cin issues [modified] Pin
Harold_Wishes24-Jul-06 10:48
Harold_Wishes24-Jul-06 10:48 
GeneralRe: cin issues Pin
Zac Howland25-Jul-06 4:42
Zac Howland25-Jul-06 4:42 
QuestionRe: cin issues Pin
David Crow24-Jul-06 9:41
David Crow24-Jul-06 9:41 
QuestionDisplaying Multiple form in vc++ Pin
ningthemcha24-Jul-06 6:01
ningthemcha24-Jul-06 6:01 
AnswerRe: Displaying Multiple form in vc++ Pin
David Crow24-Jul-06 6:05
David Crow24-Jul-06 6:05 
QuestionVC++ 6.0 IDE mse.exe Pin
bob1697224-Jul-06 5:58
bob1697224-Jul-06 5:58 
AnswerRe: VC++ 6.0 IDE mse.exe Pin
bob1697224-Jul-06 6:03
bob1697224-Jul-06 6:03 
QuestionWindows NT 4.0 DDK download Pin
szilardcs24-Jul-06 5:07
szilardcs24-Jul-06 5:07 
AnswerRe: Windows NT 4.0 DDK download Pin
toxcct24-Jul-06 5:46
toxcct24-Jul-06 5:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.