49,761 Topics
| |
please help meeee write a program for a local bank to manage their accounts. the bank offers two account types,saving and checking,each customer must maintain a minimum balance, if the customer`s balance falls below the minimum ,ther is a service charge 10 aed for saving and 25AED for checking. the … | |
Hi there, I've been looking to figure out what a USB port does when it's overloaded by too much bandwidth (?), and it the port just shuts down, right? Might you have any ideas on where to look/what to look for with USB research? Is it even possible to automatically … | |
I'm creating the a Card game c++ program and I got some problem. PLZ help!! I got few files: Main.cpp (ask user which card game he want to play) Card.h (creat rank and suit for cards) War.h, War.cpp (creats War game) TicTacToe.h, TicTacToe.cpp (creats TicTacToe game) Game.h, Game.cpp (required to … | |
Hi everyone, I've been having some troubles with this code (I'm a beginner). All errors are resolved and it runs, but as soon as it starts it says "main.exe has stopped working" and closes. I'd appreciate if someone could look over it and tell me what's wrong. main.cpp: #include "SDL/SDL.h" … | |
I was wandering what could be the causes of this error message? Like in general. `\\: *stopped,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation fault",frame={addr="0x00402d53",func="Domain::Movie::show",args=[{name="this",value="0x1"}],file="..\\src\\Domain\\Movie.cpp",fullname="e:\\eclipse for c++\\workspace\\lb6-8oop\\src\\domain\\Movie.cpp",line="36"},thread-id="1",stopped-threads="all"` 10x. | |
Our hardworking chef is bored of sleeping in his restaurants. He has decided to settle down. The first thing he must do is to find a suitable location to build a palatial home. Think of the city as a two-dimensional grid. There are N restaurants in the city. Each of … | |
Hi guys. so I have been trying to solve this problem and I wrote a bit of which I think its part of the solution. so I would apreciate a help from you guys. The problem: A palindrome is a word, phrase, or any other sequence of letters that can … | |
Evening to everyone. I have a new project that is rather lengthy, but I am almost done with it. Sorry about the long read, but I was hoping to answer any questions that you may have upfront by posting all that I know about this project. Thanks Here's the assignment: … | |
I am developing a IE toolbar using MS VISUAL STUDIO 2010 VC++ I have a popup menu, having two options WEB SEARCH and IMAGE SEARCH. my problem is the pop up menu works fine when i see the output in DEBUG mode ... The pop up menu works fine even … | |
I need your help regarding the message acknowledgement in the queue when the message reaches at the queue. Any help would be highly appreciated. the code for my queue class is; struct ListNode { ListNode(gcroot<message^> msg); gcroot<message^> msg; ListNode* next; }; ListNode::ListNode(gcroot<message^> msg): msg(msg), next(nullptr) {} public class queue { … | |
Hi, I am learning queues and I have found 2 examples. Both examples represent queues with limited size, for example 30. But <queue> allows us to create queue that is not limited by ***pre-set** queue size. Can anyone explain me how have they created something like that? Thanks! ***By *pre-set* … | |
Consider I have this piece of code: #include <iostream> using namespace std; enum TEXTURE { SAND, GRASS, DIRT, ROCK, SNOW }; class grid { public: TEXTURE type; string str; }; grid layer[5]; int main() { layer[0].str = "AAAAA"; layer[1].str = "A A A"; layer[2].str = " A A "; layer[3].str … | |
typedef union { unsigned Color; struct { unsigned char B, G, R, A; }; } RGB, *PRGB; inline RGB Rgb(int R, int G, int B) {RGB Result = {((COLORREF)((BYTE)(R)|((BYTE)(G) << 8)|((BYTE)(B) << 16)))}; return Result;} inline RGB Rgb(COLORREF Color) {RGB Result = {Color}; return Result;} The above is my code … | |
Can anybody here tell me please how to display a notification/message box in c++. suppose i'm making a program for factorial of a no. and i want to display the result in a message box with msg..." Factorial of No. is <fact>". help me please!!! | |
suppose i got a matrix 0 1 0 0 2 0 0 0 4 0 5 0 2 1 3 4 4 5 0 0 0 3 2 0 2 Select a matching by choosing a set of zeros so that each row or column has only one selected. It … | |
Hello again! I am still working on a program, and I am now working on sorting an array. Well, the array is a bunch of strings read from a text file. Some of the strings were turned into integers. I need to take the strings and find a way to … | |
I need GMPXX on MinGW. This is driving me nuts. EDIT: I should mention I've tried using the precompiled MinGW GMP and GMPXX libraries via the **mingw-get**. And they fail. I removed them. I compiled GMP in MSYS with the following line. ./configure --enable-cxx --prefix="/mingw" && make && make install … | |
Hello, i want to create a vector of pointers and delete them,but i am little confused whether my code is OKAY or not. here's my code: vector<Object*> SpriteList; for(i=0;i<10;i++){ Object* tempobj; tempobj=new Object(); SpriteList.push_back(tempobj) } for(int i=0;i < (int) SpriteList.size();i++){ delete SpriteList[i]; SpriteList.erase(SpriteList.begin()+i); } is there any memory Leak??plz help... | |
Dear all, I have been away from c++ for a while and I have just got back and started reading about "c++ concurrency in action". I found an example where the author gives function witch returns thread instance but I can not understand how you can declare a function in … | |
I have the following: typedef union { unsigned Color; struct { unsigned char B, G, R, A; }; } RGB, *PRGB; Then I have: RGB Rgb(XYZ Xyz) { RGB Result; double X = Xyz.X / 100; double Y = Xyz.Y / 100; double Z = Xyz.Z / 100; double Red … | |
I was wondering how to **Connect** to a FTP server in the form of it having Address, Username, and Password. Then be able to either edit or upload a file to a specific folder on the server. Because I am designing a website with a current news box on it … | |
can somebody convert this line to c++? thanks fscanf(in, "%s %s" ,student[x].name, student[x].num); | |
Confusing piece of code... Xcode compiler complains 'No matching function for call to 'init_population' yet another portion of similar code for another function works fine??? Any ideas please. void init_population(int**,ga_vector &,ga_vector &); void init_population(int** donut_population, ga_vector &population, ga_vector &buffer ) { int tsize = GA_TARGET.size(); int double_digit = 0; CRobot … | |
Hey guys, i'm Working On A Project That Gets All Employees And Their Data From the User Then Saves Them in A Txt File ( Fstream ) Anyway, i figured out how to Do That But What im at stuck at now is how to search through the txt file … | |
Hello all . I used to problems with my program shaking when i mioved it off screen. I found code thats supposed to fix it . It came from some program i was tinkering with. Its had many complex textures and all added to its form and the form didnt … | |
What is the difference between these two and why does one compile fine compared to the other :S //MyFile.h #include<iostream> using namespace std; inline std::ostream& operator << (std::ostream& Str, const RGB &Rgb) { Str<<"R: "<<(int)Rgb.R<<" G: "<<(int)Rgb.G<<" B: "<<(int)Rgb.B; return Str; } //Main.cpp #include <iostream> #include "MyFile.h" using namespace std; … | |
Hi, I am trying to access private level members with a Derived class but keep getting: Error1 cannot access private member declared in class 'TimeType'. Here is my code for the Base Header file: . . . class TimeType { private: int hours; int minutes; int seconds; public: virtual void … | |
At work we have a large number of unit tests that try to alert us that we have made changes that have broken our code. Many of these tests work by evaluating functions under known conditions and comparing the result with the known result. The known result is acquired by … | |
I'm having trouble with getpixel function. Sometimes it returns the correct pixel ref and others it returns "4294967295" which I think is "CLR_INVALID" COLORREF color; HDC hdc_ = GetDC(NULL); //get dc of whole screen color = GetPixel(hdc_, 10, 10); std::cout << color << endl; That is the simple code, any … | |
#include<iostream> #include<cstdlib> #include<ctime> using namespace std; int main() { int N,A[8]; cout<<"Enter the number:"; cin>>N; srand(time(0)); for(int i=1;i<=8;i++) { A[i]=rand()%40+10; for(int j=0;j<1;j++) { cout<<A[i]; } cout<<" "; } return 0; } |
The End.