~homsar47's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Members
Active Posts:
29 (0.09 per day)
Joined:
06-October 13
Profile Views:
336
Last Active:
User is offline Apr 12 2014 08:34 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
Classic
Your Car:
Who Cares
Dream Kudos:
0
Icon   ~homsar47 was raised by a cup of coffee

Posts I've Made

  1. In Topic: If File Can Be Created?

    Posted 10 Apr 2014

    I feel so stupid right now.

    I used the catch (Exception e) and turns out, I was actually giving valid path names, but thought I wasn't because I forgot about the working path. Guess I wasn't thinking and so decided not to try invalid symbols until now.

    Thanks for the help! All is well for now. ;)
  2. In Topic: If File Can Be Created?

    Posted 9 Apr 2014

    I tried using:
    bool IsFileValid = true;
    try
    {
    System.IO.File.Create (s);
    } catch  {
    FileIsValid = false;
    }
    if (FileIsValid == false)
    {
    Console.WriteLine ("ERROR: {0} != valid file.", s);
    return 1;
    }
    
    


    To find the same result.
  3. In Topic: C - searching for string inside string results in crash

    Posted 15 Feb 2014

    Okay, using the files isn't necessary. It's convenient, but I'm okay with using a char array.

    However, the program doesn't agree. It still crashes!

    int optsvalid(int number, char **text)
    {
      int optnumber = number;
      int validoptnumber = 0;
      char *OPTLIST = "-gb -gbc -nes -snes -sms -gg -smd";
      while (optnumber != 0)
      {
        if (strcmp(text[optnumber], OPTLIST) != 1)
        {
          validoptnumber++;
          optnumber--;
        } else {
          optnumber--;
        }
      }
      if (validoptnumber != 1)
      {
        return FAILED;
      } else {
        return SUCCEEDED;
      }
    }
    
  4. In Topic: C - searching for string inside string results in crash

    Posted 15 Feb 2014

    View PostCTphpnwb, on 15 February 2014 - 10:45 AM, said:

    How are you calling the program? Do you have command line inputs?
    Do you output them at the beginning of main to see that they've been input correctly?

    You might try calling optsvalid using constants as a test.

    Constants? What do you mean?
  5. In Topic: CM/IN/FT Converter: CM changes self when calculated?

    Posted 27 Oct 2013

    Ah, I see what you mean. The value of TextBox1 is whatever the user types into it.

My Information

Member Title:
New D.I.C Head
Age:
13 years old
Birthday:
August 28, 2000
Gender:
Location:
C:/
Programming Languages:
C, VB.NET, C#, Assembly

Contact Information

E-mail:
Private

Friends

Comments

~homsar47 has no profile comments yet. Why not say hello?