User Profile

Collapse

Profile Sidebar

Collapse
xlsmnt
xlsmnt
Last Activity: Jul 21 '08, 01:13 AM
Joined: Feb 4 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • xlsmnt
    replied to C++/CLR classes between forms?
    in C
    Could you potentially direct me to reading material on C++/CLR? I haven't found any books or tutorials on the subject.
    See more | Go to post

    Leave a comment:


  • xlsmnt
    started a topic C++/CLR classes between forms?
    in C

    C++/CLR classes between forms?

    I was wondering how, in a c++/clr project you pass a class to one form, and then return it to the original form?
    See more | Go to post

  • xlsmnt
    started a topic vc++ Form enable/disable
    in C

    vc++ Form enable/disable

    I'm writing a program in Visual C++ which uses multiple forms which are activated through a menu option, when a new form is opened the main form is disabled. I am having problems getting the main form to enable once the new form is closed.
    See more | Go to post

  • xlsmnt
    started a topic counting vars
    in C

    counting vars

    I was wondering how to simplify my overly large if statement in the code below, I would appreciate any advice.
    Code:
    int main(int argc, char *argv[])
    {
      int numofvar= 0;
      int totalnumofvar = 0, i, j;
      string str;
      gs(str); 
      for(i = 0; i<str.length();i++)
    {
    if(str[i] != '1' && str[i] != '2' && str[i] != '3' && str[i] != '4' && str[i] != '5' &&
    ...
    See more | Go to post

  • xlsmnt
    replied to Getting input the rightway?
    in C
    Well for some reason I'm not running into it now, does the system I'm compiling/running on effect that somehow?

    Also I was wondering whether this
    Code:
    void getstring(string& ptr)
    {
    getline(cin, ptr);
    }
    int main()
    {
    string * ptr;
    string mystring;
    ptr = &mystring;
    getstring(*ptr);
    }
    was the same as this
    Code:
     
    string
    ...
    See more | Go to post

    Leave a comment:


  • xlsmnt
    replied to Getting input the rightway?
    in C
    I found my own answer, the problem wasn't in getline, but in the variable I was referencing, for some reason my compiler didn't catch that I had a declared pointer "mystring" and a declared string "mystring" in the same function. So I wrote the getstring() function separately as
    Code:
    string getstring()
    {
    string input;
    getline(cin, input);
    return input;
    }
    This seems to...
    See more | Go to post

    Leave a comment:


  • xlsmnt
    replied to Getting input the rightway?
    in C
    cin.ignore() causes the function to eat the first character of every string after the first string, and I have no idea why. The upside is it is now providing me with strings instead of random ascii symbols....
    See more | Go to post

    Leave a comment:


  • xlsmnt
    replied to Getting input the rightway?
    in C
    It doesn't work correctly after multiple implementations , if I use, getline(cin, string); more than three times or so it begins to spit out random errors, and if I use it in a function that is implemented several times it spits out gibberish....
    See more | Go to post

    Leave a comment:


  • xlsmnt
    started a topic Getting input the rightway?
    in C

    Getting input the rightway?

    I've recently started working with C++ and wondered if there was a "right" way for getting input from the console window. From what I've seen whenever I attempted to implement it more than once, cin>>string seems to fail on items of the "string" type. The use of getch()/scanf() isn't really satisfactory because getch() requires lots of garbage add ons to recognize the end of the string, and backspacing, while scanf() seems...
    See more | Go to post
No activity results to display
Show More
Working...