Re: help needed on inputting - tearing hair out .. please!!!



Hi Patrick:

First, I see that you are trying to compare a string with an int
followed by an assignment to a boolean in the lines:
correct = (guess > y);
correct = (guess < y);
I assume that's where your program is not compiling since there are
three different data types being used here.

What is the type of the variable, in? Are you capturing input from the
command line or a text file?

I may have an example program for what you are trying to accomplish.
It's on my laptop at home, but I have a CD archive here at work, and I
will look for it this afternoon.

Sincerely,

Mike.

.



Relevant Pages

  • Re: assert-like debug { /* code */ } feature?
    ... I was unaware of assignment being interpreted as predicate. ... the value of the expression) is a boolean, ... type of `y = 1' is int. ... requires a value of type boolean. ...
    (comp.lang.java.programmer)
  • Re: gmpy moving to code.google.com
    ... raise TypeError, "You can interact Decimal only with int, long ... or Decimal data types." ... You can interact Decimal only with int, ... data types. ...
    (comp.lang.python)
  • Re: How to write better code for your projects ?
    ... >>it won't do any widening of data types. ... The compiler OTOH, thinks in terms of the internal word size ... > extern int x; ...
    (comp.arch.embedded)
  • Re: char vs int
    ... basic data types followed by any number of asterisks are unique data types? ... E.g. int * is as different from int *** as a char is from a double. ... > concept of pointers. ... > to pin down your difficulties, have a peek at the FAQ ...
    (comp.lang.c)
  • Re: Replace: Problems stripping out Comma for a Integer field
    ... I resorted to changing the data types in my table from INT to ... If a user puts a Comma into an integer field I will ... > out commas for an integer field on the fly. ...
    (microsoft.public.inetserver.asp.db)