Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 8:28
method00712-Jul-06 8:28 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 9:05
led mike12-Jul-06 9:05 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 11:01
method00712-Jul-06 11:01 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
led mike12-Jul-06 12:11
led mike12-Jul-06 12:11 
GeneralRe: what is equivelent of Inet1.OpenURL in visual c++ 6 Pin
method00712-Jul-06 12:14
method00712-Jul-06 12:14 
QuestionUser Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 5:02
Harold_Wishes12-Jul-06 5:02 
QuestionRe: User Input revisted 2 Pin
David Crow12-Jul-06 5:17
David Crow12-Jul-06 5:17 
AnswerRe: User Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 5:39
Harold_Wishes12-Jul-06 5:39 
I ended up doing this instead:

char buff[1024];
  unsigned int value;
  int charsRead;

  bool validEntry = false;
  while (!validEntry)
  {
      cout << "Please enter the number of subunits: ";
      cin.getline(buff, 1023, '\n');


         if (sscanf(buff, "%u%n",&value,&charsRead)==1)
         validEntry = true;

     if (validEntry == true)
             if (value >= 1 && value <= 12)
          break;
         else
          validEntry =false;
  }


It seems to work in main() but I still need to test it in the function I created since that is where I want it. I've had some issues when passing data between functions.

Thanks Smile | :)

-- modified at 11:40 Wednesday 12th July, 2006
GeneralRe: User Input revisted 2 Pin
David Crow12-Jul-06 5:53
David Crow12-Jul-06 5:53 
GeneralRe: User Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 6:12
Harold_Wishes12-Jul-06 6:12 
GeneralRe: User Input revisted 2 Pin
David Crow12-Jul-06 6:33
David Crow12-Jul-06 6:33 
GeneralRe: User Input revisted 2 Pin
Zac Howland12-Jul-06 10:12
Zac Howland12-Jul-06 10:12 
GeneralRe: User Input revisted 2 [modified] Pin
earl12-Jul-06 8:52
earl12-Jul-06 8:52 
GeneralRe: User Input revisted 2 [modified] Pin
Harold_Wishes12-Jul-06 10:04
Harold_Wishes12-Jul-06 10:04 
Questionpthread Pin
mehmetned12-Jul-06 4:55
mehmetned12-Jul-06 4:55 
AnswerRe: pthread Pin
toxcct12-Jul-06 4:58
toxcct12-Jul-06 4:58 
GeneralRe: pthread Pin
led mike12-Jul-06 5:02
led mike12-Jul-06 5:02 
AnswerRe: pthread Pin
David Crow12-Jul-06 4:58
David Crow12-Jul-06 4:58 
AnswerRe: pthread Pin
led mike12-Jul-06 5:05
led mike12-Jul-06 5:05 
AnswerRe: pthread Pin
Jun Du12-Jul-06 5:08
Jun Du12-Jul-06 5:08 
Questionoverzealous protection rules Pin
Dave Schumann12-Jul-06 4:53
Dave Schumann12-Jul-06 4:53 
AnswerRe: overzealous protection rules Pin
toxcct12-Jul-06 4:56
toxcct12-Jul-06 4:56 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 5:02
Dave Schumann12-Jul-06 5:02 
AnswerRe: overzealous protection rules Pin
Dave Kerr12-Jul-06 4:59
Dave Kerr12-Jul-06 4:59 
GeneralRe: overzealous protection rules Pin
Christian Graus12-Jul-06 5:00
protectorChristian Graus12-Jul-06 5:00 

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.