49,761 Topics
| |
Hello I need a way to make a file dialog box for selecting a filename/path. Is there a common file dialog box? I think there may be seeing as all of the GUI programs in Linux have a similar looking file selection type. Thank you. | |
ok so i've just started using visual c++ for my coding. I'd like to add a sound files to my current project. I've looked up so many ways to do this from allegro to directx and BASS but i cant seem to get anything to work. I've been looking into … | |
In function `_start': undefined reference to `main' what does this mean? I don't have a function _start. and my main.cpp is empty, theres just a few giant source files (500+ lines together) that are never called... Do you see any problems with this that might have something to do with … | |
I need to format my BMR output so it has a nice neat appearance with the Headings over each column. In one column it should say BMR and the other Daily Calorie Intake. This is what I have so far: [CODE]/* Program: Harris Benedict Equation * */ # include <fstream> … | |
I need to create a program that monitors incoming packets to a certain process. Each incoming packet needs to be searched for a string of hex (eg. "FF 00 00 03") and modified to be null (eg. 00 00 00 00). Or, if it's easier, to just completely block the … | |
I was wanting to try a neat little project while i was bored at work and came up with a CodeInjection class. I understand this class is VERY POORLY DESIGNED. My question is how can i fix this?? what can i do differently to make this class not so tightly … | |
please guys I need help have ramdom numbers and I need to choise the higher number | |
im totally new in object oriented progrmng in C++ course, i have to create a table in which i have to answer in yes /no that for example if class can be public so the answer is Y and if class can not be public then answer will be N. … | |
Why use const char* instead of string? I see it all over the place. Personally, I prefer strings. | |
I'm having trouble aligning some text with setw and the left alignment. I'm not sure if it has something to do with the fact that I'm printing from a function. The text within quotes aligns fine, but the output from the function aligns to the right and screws up the … | |
hi i need an idea for my college time table management project | |
I have found a solution here: [url]http://support.microsoft.com/kb/220600[/url] The problem is that its for MFC..I dunno how to create wrapper for .net C++/CLI I cannot add it via class wizard. using #import produces error: [CODE]Error 1 error C2812: #import is not supported with /clr:pure and /clr:safe[/CODE] I want to use automate … | |
Hi all! I'm a beginner to C++ and wanted to try my skill at creating a decimal to binary converter in the console. I tried two different methods, but I failed at both. My first program was an attempt at being organized and using multiple functions and snaking the output … | |
i really have a hard time creating classes...it seems as if i always run into the trouble of....should this be a function in the class......should it be private or protected......does this really need to be a member variable of the class.....what all should my constructor have inside of it....how can … | |
Hai, i have a problems with my ListView in Visual Studio 2008. I can move this delay tab : [url]http://localhostr.com/file/ezujFtB/Unbenannt.png[/url] Like this : [url]http://localhostr.com/file/A91Yo4D/Unbenannt-3.png[/url] How can i prevent that ?, i tryed many differnt settings, but nothing seems to work. | |
Hello, I am having some troubles with coding from one of Joyce Farrell's books here is a link showing the exact thing to which I am trying to figure out. [URL="http://books.google.com/books?id=akzWMS9_PYoC&lpg=PA327&dq=BankAccount%20Class%20from%20Joyce%20Farrell&pg=PA331#v=onepage&q&f=false"]Exact question[/URL] Here is the code I have written thus far. [CODE]#include <iostream> #include <iomanip> using namespace std; class BankAccount … | |
while i was learning about global variables I did some trials and found one problem. Here goes my code. [CODE]int cows = 10; //global variable void farm1() { int cows; cout<<"in farm1, cows="<<cows<<endl; cows++; } int main() { //cout<<"in main, cows="<<cows<<endl; farm1(); //cout<<"back in main, cows="<<cows<<endl; } [/CODE] Here line … | |
[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; static const char Y= 'Y'; static const char N= 'N'; char ans; … | |
I've implemented a version of the String class (named Str) and I was implementing the getline fucntion of the getline function that's what I got [CODE]void* getline(std::istream& is, Str& s){ s.clear(); char c; if(is){ while(is.get(c)) s.push_back(c); return s.begin(); } return NULL; } [/CODE] I used void* so I would be … | |
I'm having some difficulty figuring out how to delete the objects I new'ed during run-time. I'm using a heterogeneous collection. Simplified Example: [CODE] const int SIZE = 4; myBase* objs[SIZE]; objs[0] = new myChild1(); objs[1] = new myChild2(); objs[2] = new myChild3(); objs[3] = new myBase(); //I tried: for(int i … | |
I'm getting a segmentation fault at this line. So far, my program has classes. A blahpod with class of songs in them. Then there is the node class. I call the operator= which is supposed to put one pod into another. It looks like so [CODE]bobcatPod bp2( bp1 );[/CODE] That … | |
[code] std::string headerInfo = " "; //Verify stream is still in good condition if(streamReader->good()) { streamReader->ignore(fileSize, ':'); //work arounds =) v------------v streamReader->getline(&headerInfo[0], sizeof(headerInfo), '\n'); } else { //Error } return headerInfo; [/code] The first parameter of getline wants a char* to store the data, so instead of creating an array … | |
I found this somewhere on some website. Would you care to decode it, like explain why, when, and how they used the codes? The only part I didn't get is how did they get "largest_1" and "largest_2" by doing this. I see that it loops to find it but does … | |
I am doing Yahtzee and I need help creating a hold function. can anyone help me? | |
[CODE] Rectangle ^ClientResolution = gcnew Rectangle(); ClientResolution = Screen::GetBounds(); float CurrentWidth = 1366 ; float CurrentHeight = 768; float RatioWidth = ((float)ClientResolution->Width / (float)CurrentWidth ); float RatioHeight =((float)ClientResolution->Height / (float)CurrentHeight); this->Scale(RatioWidth,RatioHeight); [/CODE] error C2661: 'System::Windows::Forms:: Screen::GetBounds' : no overloaded function takes 0 arguments Any help would be much appreciated. | |
I have this problem i had to do for school and im a little confused on what i should put in my first while loop for my program. Thanks for any help pointing me in the right direction! Heres the problem. [url]http://img546.imageshack.us/img546/7454/problemfk.jpg[/url] and heres the code i have so far. … | |
Is there any function that allows me to completely remove and [I]deallocate[/I] all contents of a std::map? The functions [icode]clear()[/icode] only removes all elements, it doesn't free any memory. | |
Currently I'm having an issue with a homework problem although I'm not asking for the answer. I Just want to see if anyone is able to help me trouble shoot my issue... Issue: - ArrayPointer.cpp: In function ‘int* duplicate(int*, int)’: - ArrayPointer.cpp:62: error: expected `;' before ‘list’ - Line 6 … | |
Hi, I am trying to write a small program that would permute a list of binary numbers to the nth bits. Some reason, the code is not compiling. Also, I am using Visual Studio C++ 2010 Express. When i attempt to compile a code, it doesn't highlight where the errors … | |
| I am using borland compiler 3.0,is there any way such that the output window will close on its own after the required functions has been completed by the program? |
The End.