49,761 Topics
| |
Question on getting my class to work with a project I am working on oldY = changeY1(pos1[0]); I call the changeY1 function in my main and am setting a int = to the value returned,I am declaring this function in a seperate class of its own : [CODE] #ifndef INTERVAL_H … | |
i'm making a quick class that has some getters and setters. i'm getting an error at line 46 when i try and create my setItemNumber function. Im also getting an unexpected EOF error but i think that it might have to do with my first error. this is my code.... … | |
The purpose of my program is to have the user to enter a word to be checked to see if its a palindrome or not. My program works in Visual Basic...but i have to turn it in to my teacher through SSH. When I run my program there this is … | |
Making a Game for a school project and Im using a 2D array to make the gameboard. Well in the begginning of the game the user has to input what the current game board looks like. I have it so the user is entering data and the data is being … | |
Hello, Let me introduce to you my problem first, and then you guys should decide on the best method to take upon it. My sister has lately been HELLa annoying with her crush over Justin Bieber, and it's really starting to get to me not to be able to think … | |
Is it better to write the void funtion before the main funtion, or write it below the main function and mention it "prototype" it before the main? I know both works, but im wondering if the program uses a bit more time searching for it when its below the main … | |
Hello!I need my program to display data from Edit control. But the main window does`n update when I press OK button on Dialog boxes. Please, help me to find out what`s wrong with it...(please sorry for my English). Thanks in advance for any help. [CODE]#include <windows.h> #include "resource.h" #include <tchar.h> … | |
I am making a game bot which does certain function for a certain ammount of time. I want to give the user an option to shutdown when it all ends. What functions are out there to do that? Can I do it with <windows.h>? | |
hello every one, i have a problem in parsing a text file this is a sample text file: 6 1 1 + 3 4 5 + * 3 4 5 * + 1 + 1 1 1 + 2 3 8 2 / - 1 + * the first line … | |
Hello, I'm new to c++ and i'm making program to read from numbers from file and calculate average. The numbers in file is like this [CODE]10; 15; 200[/CODE] and my source so far [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream … | |
Hi,All I'm now working in project to compress a files. And I used Huffman encoding to get new code for each character in the site. but now I can't complete my project. How can I use bitwise operation to put all those new codes into the compression file. and Also … | |
Hi, I am writing a student database in C++. There comes a point in my program where I have a succession of "cout's" requesting the user to input the students grade for a particular course. I want to check that the input is not less than 0 or greater than … | |
Hello, I want to code an application that calculates a program's complexity. I may have put this the wrong way: I want to count the operators, variables, function calls etc. in a C/C++ program. At first I thought about reading the .C file as a .txt file, looping through each … | |
good day every one i am osagie by name, i've been trying to develope a biometric(fingerprint) software in win32 that will serialise and save all user fingerprint record to a binary mode cpp file(after due analysis). Thereafter, d program is expected to send a copy of the serialied file to … | |
Hi there, I am wondering what I am doing wrong ss when a user inputs anything on the 10th row..the 'X' char is misplaced :s Also, I cannot seem to limit the user from inputting BEYOND the board..I feel like I've taken a wrong step somewhere. Thanks once again :) … | |
Hello, I am doing simple program with Visual Studio and I am using System.Windows.Forms. It has DataGridView, which represents sudoku board. Everything goes OK, but when I manually edit some cell, then the program crashes and throws some exception, which has something to do with unproper conversion of types. Here … | |
I need help on making an isosceles triangle 2sides with 5 asterisks, and a base with 9 asterisks, and has no asterisks inside the triangle. I've come up with the codes on a 2sides with 5 asterisks and the base with 9 asterisks, but this time, it has asterisks inside … | |
| I am converting seconds to minutes, hours, days. For some reason I have an issue with the days not calculating when running the program. The 'if' statement seems completely ignored by the program. I think this may be caused by the warning I get. Any help would be greatly appreciated … |
I searched from internet. They said have 2 ways to create sub-function file, first way is : using header file which is easier to write. second way is: using cpp file which will increase the compilation time. But my lecturer say using header file to write sub-function is a wrong … | |
I'm having a couple of problems w/ getting the program to end when the user enters 'Q' after they've been asked if they want to try again. Also, after enter a negative int is entered for employee id then either the program moves to displayEmployeeInfo & shows the info that's … | |
I am writing a program that accepts an input file of 10 items each having revenue across 4 quarters. In this particular function I have to determine if the items profit has steadily increased, decreased or went up and down across the 4 columns, or quarters(qu) as they are referenced … | |
Hi I'm trying to create a program that gathers data from some ADC connected and do some averaging on the data. It's build up around classes containing systeminterface and sensors making a datamodel. The program is pretty big, but has worked intil implemention of pthreads I wanted to create a … | |
I'm having a problem writing an unsigned char array to a file. When I write it to stdout using printf, it displays properly, however if I write it to a file, when I open it, I can't read the file. It looks like it may be writing the file in … | |
How would one read an encrypted file's (encrypted using windows' EFS) header? I would like to be able to read the header and extract FEK that was encrypted by either the public or private key of the file. From reading up I understand the structure of the file header I'm … | |
Hi All, I am working on optimizing the memory usage of my codes and I found a problem that I do not understand. Please let me know what you think. Code: [CODE]typedef map <pair<string, int>, vector<pair<int, float> > > TDM; void parsefile (TDM & my_map, string in_file); // parse input … | |
I'm working on a map editor and the tiles show up i a file as [CODE]1, 0, 0, 1, 1, 0, 1, 1[/CODE] so here's a 4x2 map. I'm wondering how can I parse out the integers from the commas and assign them to a multidimensional array so that \i … | |
my question is: Write a function that accepts an integer parameter and returns its integer square root. The function should throw an exception if it is passed an integer that is not a perfect square. Demonstrate the function with a suitable driver program. i am getting that : Error 1 … | |
First, yes this is a school project. That said, I have a seed, now I need to create a function that will create a byte array of random bits. The input for the function should be the number of requested random bits. Here's an example: [CODE]unsigned char* getRandomBits (int number);[/CODE] … | |
hello i am new to this forum i am basically stuck with this programme and i need help....it is a brick game....i want to move the ball and slider at the same time without using threads....i am allowed to use the gotoxy function arrays and pointers thats it can anyone … | |
Is there a way to gather network/internet traffic statistics? The end result is that I need to create a random number generator using some network stats as a random seed, so I need to pull information that is highly variable. Could be packet data (maybe sequence numbers), or traffic data … |
The End.