I have a program that makes change from an amount. It works fine, but the output is the correct output looped over and over. I have tried everything, but it still doesn't work. For example, a amount of 98 should print
I have a program where the user inputs a line of integers, and then all unique ones are outputted. It works fine-almost. It prints the numbers correctly, but prints them more than once and I'm not sure why.
Code: #include <iostream> using namespace std; int main ( ) {
I am starting to learn C, its quite an easy language to learn from the basics, I hope to learn others as time goes, I wonna know how do I get the external / remote IP of a computer?
I'm looking for a way to run my console app in C# on one computer, but the actual program is ran on another computer. IE I open the file or hit "Run" in Visual Studio on computer1, the computer2 runs the program. I was looking online and found some stuff that may be applicable, but I didn't see a very clear answer.
I am programming in C and am having some trouble finding the .txt file I saved after having run my program. It is likely a stupid error on my behalf. However, it is causing me quite a bit of grief at the moment. I attached my source code below abgcchp27ex1.txt (2.01K)
I coded my structure within my header file(bookInfo.h) correct along with everything else. My dilemma is a matter of my file location and whether it actually saved.
/* This program takes the book info program from chapter 27 and writes the info to a file named bookinfo.txt. */
// First include the file with the structure definition
I have a problem with a program..I wanna make a program for scan the computer screen.I mean for example there is a video which shows just 5 pictures(apple,pear,banana,strawberry,cherry pictures) but this pictures are turning nonstop in one second. and this case is continuous progress.There are 5 pictures and are chancing. Lets get my problem, I wanna make a program and when apple on the screen my keyboard will push 1,when pear on the screen my keyboard will push 2,banana is 3,strawberry is 4,cherry is 5. I have this 5 pictures which are in the video and I will introduce tham to program and I wanna compare my lib. and screen and get output.
I am writing a program in which the computer will read a txt file and encypt it. The encryption works fine, but the computer cannot read the file perfectly. If there's a newline, the scanning process stops. For example I have the following text in the txt file.
One two three four five (newline) Six seven eight
The computer will stop reading after 'five'. I assume that is because I use fgets.
I have a weird problem, my computer restarts imidiately after program writen in dev-cpp is compiled AND run. When I run any program, it lasts about 1 second, then program closes, and computer reboots. It doesn't matter whether program is writen now or earlier, my dev-cpp version is 4.9.9.2. Source code can be as simple as this:
#include <iostream> #include <conio.h> using namespace std; int main() { getch(); return 0; }
I have to develop an application that uses Qt, Excel and live-time file checking. My client gave me this:
I have a problem at work. I need you to develop this: I want one application with GUI (it said windows), that generates an report for each sheet (employee name) in the file, with the columns. I don't want to make the computer slower, so check the file and get the name of the employee that is altered and only change his report
How to start it. All Excel libraries I use stop working on my computer and this "File Checking" is other trouble, because if for each second I compare the size of the "old" file with "new" file, the memory will explode.
I'm in need of an algorithm to find the points within a triangle(vertices are known. 3d coordinates). The points are to be at same distance from one another i.e. the points are uniformly distributed within the triangle.
I have done a search about the topic and have come across some ideas like lattice points generation ,tiling polygons with Lattice triangles [URL] .... and taking their centroids as the points.
I have two or more printers and one computer. I want to print to both printers the same document at the same time... Thus when I press print on my document both printers will print the file simultaneously.
#include <stdio.h> int main(int argc, char* argv[]) { int i=0; int count=0; while(i<5) i++; count++; printf("The value of count is: %d", count); return 0; }
It only prints: The value of count is 1. I'm confused on why it doesnt print the value of the count is 5
I am making a program where a computer and player take turns rolling dice.
There seems to be an issue somewhere in my loop where when the player selects from the possible dice choices, it rolls for the computer and does not select the choice and it immediately becomes the player's turn again.
I am trying to get it to where when the computer rolls the dice, it should display the list of possible values, and ask the user to hit the enter key in order for the computer to choose which value to select using the following command:
Code: while ( getchar() != ' ' ) ; I've tried it a hundred times and no matter where I put the command it still skips the computer's turn.
Below is my code:
Code: while (compscore < 99 && playerscore < 99){ printf("You have rolled the following pair of dice: "); a =("%i ", rand() % (MAX_VAL - MIN_VAL + 1) + MIN_VAL); b =("%i ", rand() % (MAX_VAL - MIN_VAL + 1) + MIN_VAL); multiply = a * b;
Is that really just the inverse of the view/camera matrix?
Or is that something else?
I have seen articles online on the overall mathematical theory behind it but I am using the GLM math library and it has this nifty glm::inverse() function.
I was just curious if I can do a glm::inverse(ViewMatrix) and that would be correct.
I need to know if it is possible to create a class that will detect if a cellphone is connect to my computer via a usb cable without knowing what the make and model of that computer is. If you think it is possible, how would you go about implementing it.
I am trying to use a combination of windows batch scripts as well a C++ program to put users data into one single .CSV file. Right now, I have a batch file that will output data from the command line into multiple .txt files. These files are mac.txt, serialnumber.txt, computermodel.txt, and computer name.txt. What I want to do, is to have users run the batch file, which will in turn run the .exe C++ file which will concatenate all their data into one file, computerinfo.csv. The file format for this file would be to have the mac address, serialnumber, computer model, and computer name all in their own column.
My main issue is that these individual files don't have the format that I would like, but based on the command prompt functions, there isn't really any good format. For example, the mac.txt file has the following format:
Physical Address Transport Name =================== ========================================================== xx-xx-xx-xx-xx-xx DeviceTcpip_{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} yy-yy-yy-yy-yy-yy Media disconnected zz-zz-zz-zz-zz-zz Media disconnected
but all I really want is xx-xx-xx-xx-xx-xx
The other files have other issues with format, but if I can figure out this one then the others should be a piece of cake.
Also, I want the output of this to all go in one row, and as other users run this file, they will go into new rows without touching the rows above.
I have a file on one server(Windows 2003) and need to access from another server (IIS server - Windows 2008) , I have written the program for the same which works fine and I can access the file.
But when this comes to the DLL (which registered successfully on Windows 2008), its not able to find the file on Windows 2003.