Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PrograMan

    reset autoincrement counter

    I set up a table with 5 columns (the number doesn't matter so much), the first one I have set to autoincrement. I have tested the table with INSERT and DELETE queries and have been successful with the tests. I've noticed, however, as the rest of you probably know, that even though I've deleted...
  2. PrograMan

    2d animation issue with sprites

    I have a problem. If you'll look at the following code you'll see that what I have now is pretty good right now (in my eyes anyway). However, in those rightkey(), downkey(), upkey() and downkey() functions you'll notice I'm trying to keep the sprite within the boundaries of an imaginary box...
  3. PrograMan

    Clearing data inside char array.

    I'm looking for a function or something that will empty a char array. I have one in a while loop and unless I am able to empty out the array, the while loop will continue going until something else pauses it. I know that once the array's data is removed, the program will see nothing to work with...
  4. PrograMan

    Any other way than cin.get( ) ???

    getch() won't work as the compiler will say "implicit declaration of function 'int getch(...)'". I've been using getchar(). This works most of the time, but no guarantees that a pause will always be (en)forced. And system("PAUSE") is a DOS command that will do the job, unless...
  5. PrograMan

    Pausing the program.

    Know any way to perform the same function within the console application instead of a window popping up? (BTW: that result was really cool. I didn't know that could be done.)
  6. PrograMan

    Pausing the program.

    I'm looking for a way to pause my program without using that system("PAUSE") thing. I was once told that I can use getchar(), but that doesn't always work. Is there a better way? All I want is for the program to pause so that the user can view the displayed results and then to be able...
  7. PrograMan

    cin.getline is skipped

    With the improvements you mentioned, ArkM, this is what I've come up with. If anyone can tell give me more insite to any of my faulty logic, I'm all ears. #include <iostream> #include <stdlib.h> #include <stdio.h> #include <string> #include <ctype.h> // stuff is already in main() if(input[0]...
  8. PrograMan

    cin.getline is skipped

    I've tried to correct my program given the information you provided, Arkm. 1. that redundant right brace was my bad for putting in in the first place. It belonged to the main() function. 2. I would think (input, limit) does eat 7, since it's 0-6, making 7 elements, and I defined input to be of 7...
  9. PrograMan

    cin.getline is skipped

    const int size = 26; char letters[size]; int numbers[size]; int limit = 7; char input[limit]; for(int i=0; i < size; i++) { letters[i] = char(i + 97); // getting the alphabet into letters numbers[i] = 0; // and setting each place of numbers to 0 } while (input[0] != '=') {...
  10. PrograMan

    cin.getline is skipped

    I couldn't by chance be able to empty all elements in the array so that the input is no longer there can I?
  11. PrograMan

    cin.getline is skipped

    ArkM, a lot of what you said up there confused me. I'm a layman. However, that input of '=' has worked many times. All I want to do is to be able to go through the program, read read input however many times and allow the program to accept it each time. I'll try including the <conio.h> header...
  12. PrograMan

    cin.getline is skipped

    My termination flag is while(input[0] != '=') &quot;input&quot; is the character array that is used to collect alpha input only and I told the user to enter '=' as the exit command. Basically once that array has been used the program overlooks it every consecutive time and this has happened on...
  13. PrograMan

    cin.getline is skipped

    I'm writing this little program in C++ where I have a cin.getline within a while loop. The first time I input something into the getline statement, the program will pick it up. The problem is that once it has picked it up, then everytime it goes through the while loop again it still has my input...
  14. PrograMan

    Can't remember procedure

    Well shoot, I had tried that before and I had those other results. I just now tried it again and the results came out better. Thanks guys, it all works out!
  15. PrograMan

    Can't remember procedure

    \ = mod / = div I had long since tested the function of \ operator checking to make sure that wasn't the issue, but it wasn't. I had read up a little on modulus before it anyway.
  16. PrograMan

    Can't remember procedure

    JohnYingling, the \ operator I know is the modolus operator and only returns the remainder of a division problem. Dan, the int() operation doesn't work. I think I need to somehow convert the double into integer, but the compiler tells me that using Cint() only causes overflow.
  17. PrograMan

    Can't remember procedure

    that only gives me everything after the decimal. I want everything before the decimal.
  18. PrograMan

    Can't remember procedure

    I'm dealing with larger numbers here (like, doubles) and I'm trying to take off the decimals (convert to true integers) of a number that's based off the larger number (e.g. 317602 / 3). The number length can get up to 8 places and it's irritating me. What's the procedure to hack off the decimals?
  19. PrograMan

    Closing a program down completely.

    There is no external program sharing or database or anything. At the end of program design, all there should be is a single executable that will work on probably all Windows platforms. Therefore, no dlls or ocx or anything like that. This program only utilizes textboxes, scrollbars, menus...
  20. PrograMan

    Closing a program down completely.

    I tried Private Sub Form2_Unload(Cancel as Integer) Unload Me End End Sub Is that all the unloading needed? That's just the trick that ended the program like you said. But is that all?

Part and Inventory Search

Back
Top