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...
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...
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...
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...
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.)
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...
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]...
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...
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] != '=')
{...
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...
My termination flag is
while(input[0] != '=')
"input" 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...
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...
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!
\ = 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.
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.
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?
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...
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.