vividexstance's Profile User Rating: *****

Reputation: 750 Master
Active Posts:
2,652 (1.65 per day)
31-December 10
Profile Views:
Last Active:
User is offline Today, 10:23 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:
Expert In:

Latest Visitors

Icon   vividexstance has not set their status

Posts I've Made

  1. In Topic: GUI programming

    Posted 27 May 2015

    Qt is nice because it's cross-platform. There are many GUI libraries you can use in Linux, like GTK or GTKmm (the C++ version of GTK).
  2. In Topic: How do I fix my grade program?

    Posted 26 May 2015

    View Postjimblumberg, on 26 May 2015 - 02:34 PM, said:

    Good point, the next if statement should be print it's message.


    Or the OP could just make the first check a greater-than-or-equal to 100.
  3. In Topic: How do I fix my grade program?

    Posted 26 May 2015

    What if, somehow, the grade is more than 100?

    Is there a reason you're using a float? Why not an int?
  4. In Topic: Reading math expression

    Posted 26 May 2015

    If you want to convert the character/string to integers, it's not difficult to do it yourself.

    If you know the character array/C-style string you have contains only digits, then you just have to loop through the string, and subtract '0' from each character:
    char num = '7';
    int digit = num - '0';
    printf("num = '%c', digit = %d\n", num, digit);
    printf("num + 3 = %d\n", digit + 3);

    That would print:


    num = '7', digit = 7
    num + 3 = 10

    The reason this works is that a char is simply an integer that represents a specific character in the ASCII table.

    By subtracting '0' from whatever digit character num contains, you're going to get a number between 0-9, if num only contains a digit character.

    So depending on the digit character num holds, it could be between 48 and 57. The '0' is 48 and '9' is 57.

    If you do the math out for whatever digit num can hold, it will be the conversion of that digit character to a single-digit integer value.

    The above isn't bad for learning, but instead you can use either sscanf() like you said, or you could try snprintf(), which works in a similar way.

    Using snprint(), you would be able to input an integer from the user/file, then convert it to a C-style string using that function. This way, you don't need to check to make sure it's a number or not.
  5. In Topic: delete update problems

    Posted 26 May 2015

    It would help if you tell us what's going on?

    For example, are you getting compiler warnings/errors?
    If so, what are they and where are they (the line number)?

    If the program compiles, then what input are you giving the program?

    Also, what is the expected output and the actual output?

My Information

Member Title:
D.I.C Lover
Age Unknown
Birthday Unknown
Programming Languages:
C, C++, Python

Contact Information

Click here to e-mail me


Page 1 of 1
  1. Photo

    orihotomihsah Icon

    09 Sep 2013 - 09:45
Page 1 of 1