49,761 Topics
| |
I have to doublecheck if this is the case. When using the fileSystemWatcher in the application where an event is checking for Changes in a file. With just starting the application where no changes events is fired at all the processor (AMD double core) Peeks at 50 % constantly. Is … | |
I'm working on a movie class for a project. I think I've got it reading in movies from a file. I want to test it using the overloaded subscript operator, but the Driver file will not let me enter a movie title to search for. I can't think of a … | |
Hello, Im trying to make some sort of reminder program that plays a wav every 30 seconds to remind me of what Im supposed to do. [code] #include <iostream.h> int main() { system("start alarm.wav"); } [/code] Thats what Ive got so far, now Im trying to figure out how to … | |
yea I know I spelled destructor wrong what can I say my fingers got in the way of my typing I have scoured the internet and tried several different ways to implement the destructor on my link list queue. I highlighted the troulesome code like this //***************************************** code //***************************************** here … | |
Hi I'm fairly new to vectors in C++ and I'm having some problems with them. I have a vector of vectors but I don't know why it is causing a segment fault in my program? [CODE] vector < vector<int> > grades; int temp; for(int i = 0; i < 30; … | |
Is there an easy way to open an fstream using a string? My code is as follows: [CODE]bool openArray(std::string *arrayFileName, int *width, int *height,int *myArray) { std::fstream BoardFile; BoardFile.open(*arrayFileName);[/CODE] I obviously cannot use this method since *arrayFileName is not char* but is there another way to do it? | |
I am doing my Final Year Project about Peer to Peer video streaming application. My instructor told me that the video file need to seperate into several segments and arrival to the client at the same time. After that, the video should be combined together at the client side. So, … | |
Hi I need to perogram the simple Calculatotr, Acceptable operators.' + : Add - : Subtract * : Multiply / : Divide ^ : Power ( raise left oprqnd to the power of the rifgt operand ) q or Q = Quit This is a progarm that I wrote : … | |
| I have 2 Questions and not found solution,can anyone help me: _what's conception of "word align of variable"? _Base on Visual Studio,which keyword do the that activity? _Which Library do we work perfectly with a big integer(at least hundreds of bit)? Thanks . |
My program needs to print the mirror image of a letter that's input. All the letters will be input in uppercase. And the mirror image will be printed in uppercase. So if I input A it's mirror image would be Z if B, then Y if C then X if … | |
Write a program counts in a given text the words that contain at least three different vowels (Vowels are a, e, i, o, and u). Words in the text are all lower case and are separated by at least 1 space, maybe more. The last word in the sentence ends … | |
This code is giving me the error "expected primary-expression before ']' token." After googling and looking around Daniweb I still cannot find what this means. Can anyone enlighten me? [CODE]int board[*width][*height]; if(OpenBoard(boardName, width, height, board[][*height])) { } //... //function definition... bool OpenBoard(std::string *boardFileName, int *width, int *height, int board[][100])[/CODE] | |
Hello, I am trying to pass a multidimensional array to a function but I keep getting a "expected primary-expression before ']' token" error. I'm using Dev-Cpp and here's my code: [CODE]int array[*width][*height]; if(OpenArray(arrayName, width, height, array[][*height]))[/CODE] I suppose it could be because there is nothing actually stored in the array? … | |
Im a beginner at c++ and this program seem to be easy. Im tying to get this program to multiply numbers as there put in by the user and display the answer, but if the user inputs to consecitive negative numbers the program has to stop. What concept can I … | |
Hey, I'm new and am using Visual C++ 2005 Express Edition. How do I increase the size of the console screen, I just need to make it wider for my program. Yes, I have searched, but all the methods I have found require to me use #include <windows.h> I get … | |
This is my assignment: Write a program to helps health care staff keep track of a patient's cholesterol level. It needs to have a main function that calls another function, and the function must be declared before the main function using a function prototype. A function must be called checkLDL, … | |
hey guys im having a bit of trouble making an string accessor to a private member string variable that i have declared: Class A{ public: string getname() const; private: string name; }; Thats a little example. I have tried almost everything. I have included string class header in the class … | |
I am searching for a way to change the backgroundcolor of a specific cell to red and the back to black again. With this code sometimes almost all cells is blinking because I have to use Application:: DoEvents to update the BackColor. How can I change this like this without … | |
Hi, I was doing my assignment which states: The user to enter a string which should be stored in Input_String[]. 2) Then reverse the string and save it to another array called Output_String[]. [COLOR="Red"][/COLOR] I am having trouble with the second part where I need to save the string to … | |
Dudes Wuudup?? I don't know if i'm posting this in the right place, but i jus need some help and fast. I'm trying to write the code for Tic Tac Toe in which A player plays against the computer. the only problem is that im supposed to make it work … | |
guess game In this game, you play with computer for N rounds (N should be provided by the user and passed into the function as a parameter). In each round, the computer generates a random number between 1 and 3 (including 1 and 3), and the computer asks you to … | |
[code=cplusplus]#include <iostream> using namespace std; //Function declare void displayMenu(void); void getSelection (int &userChoice); void processChoice (int userChoice); float monitorCoke( float ); float monitorpep ( float ); float monitorcana ( float); float monitorhire ( float ) ; // variable declare and const float option, cocaout, pepsiout ,canaout,pepleft,canaleft,cokeleft,hireout , pepfinal, cokefinal, canafinal, … | |
Hi, Ive recently been working on a C++ project where we are required to prompt the user for a string "command", take the first char from that string to decide exactly what command it is, and then take the remaining parts of that string and turn them into individual characters … | |
Ok, I'm writing a simple for loop with an accumulator for my class tonight and can't figure out what I'm doing wrong. I want the program to accept the first 10 even numbers from the keyboard and add them up and display an error message if someone enters an odd … | |
So I was trying to make a calender that outputs what ever month is prompted. yet this wont run, i keep getting this error 1>c:\users\lukas shininger\documents\visual studio 2008\projects\calender2\calender2\calender.cpp(151) : error C2059: syntax error : '}' [code] #include <iostream> #include <string> using namespace std; int main(){ int month,dateCount,dayCount,blankCount,totalDates,i; /*month: userinput variable … | |
I have made a simple console based flash card program for the children in my house (and for practice as I just started teaching myself the language). It uses srand to get 2 numbers and has the user input the question. I have included addition, subtraction and multiplication but i … | |
Hi There! Quick, probably dumb question but I have the following snippet [code] template<typename T> class Natural : public ArbitraryNumber{ std::vector<T> mVal; std::vector<T>::iterator mIter; [/code] instantiated with [code] math::Natural<long double> z; [/code] in my main module. Visual C++ dislikes this. When I put this in: [code] typename std::vector<typename T>::iterator mIter; … | |
How to counter invalid input for char. Let say i have a menu which allow user to key in and cin only accepts char. How can i make sure that user to more key in a string etc. | |
My assignment is to have an even integer greater than 2 entered and to output two odd prime numbers that add to it. We're supposed to use a bool function but I'm having trouble compiling. I'm getting an error that says "ambiguous overload for operator in cin >> variable" No … | |
Hi im trying to mess about with a microcontroller but I dont understand what the code means... bsend (0x0E0); Also the codes PD3 = 0X70 AND PD3 =0X7F mean nothing to me, are they related to establishing some of the ports on my microcontroller? Thanks for any help |
The End.