49,761 Topics

Member Avatar for
Member Avatar for thekitoper

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.

0
67
Member Avatar for mpike

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 …

Member Avatar for mpike
0
158
Member Avatar for jackmaverick1

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 …

Member Avatar for jackmaverick1
0
113
Member Avatar for andimiami

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> …

Member Avatar for andimiami
0
216
Member Avatar for makman99

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 …

Member Avatar for makman99
0
108
Member Avatar for lochnessmonster

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 …

Member Avatar for mike_2000_17
0
103
Member Avatar for FOGMAN

please guys I need help have ramdom numbers and I need to choise the higher number

Member Avatar for Zvjezdan23
-3
105
Member Avatar for AmerJamil

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. …

Member Avatar for AmerJamil
0
94
Member Avatar for Mahkoe

Why use const char* instead of string? I see it all over the place. Personally, I prefer strings.

Member Avatar for mike_2000_17
0
1K
Member Avatar for packetpirate

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 …

Member Avatar for Ancient Dragon
0
99
Member Avatar for KeerthigaN
Member Avatar for Moschops
-2
38
Member Avatar for VasquezPL

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 …

Member Avatar for VasquezPL
0
445
Member Avatar for dare599z

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 …

Member Avatar for dare599z
2
277
Member Avatar for lochnessmonster

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 …

Member Avatar for floatingDivs
0
113
Member Avatar for Danny1994

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.

Member Avatar for jonsca
0
125
Member Avatar for Vindal

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 …

Member Avatar for jonsca
-1
163
Member Avatar for subith86

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 …

Member Avatar for mike_2000_17
0
187
Member Avatar for Khoanyneosr

[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; …

Member Avatar for Khoanyneosr
0
130
Member Avatar for mitrious

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 …

Member Avatar for mitrious
0
353
Member Avatar for pandaEater

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 …

Member Avatar for pandaEater
0
107
Member Avatar for Rimojenkins

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 …

Member Avatar for Rimojenkins
0
158
Member Avatar for LevyDee

[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 …

Member Avatar for LevyDee
0
100
Member Avatar for Tinee

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 …

Member Avatar for Tinee
0
309
Member Avatar for Zvjezdan23
Member Avatar for WaltP
0
182
Member Avatar for sheennave

[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.

Member Avatar for sheennave
0
213
Member Avatar for mxrider

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. …

Member Avatar for ravenous
0
144
Member Avatar for tomtetlaw

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.

Member Avatar for Rashakil Fol
0
5K
Member Avatar for CanaznFTW

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 …

Member Avatar for floatingDivs
0
131
Member Avatar for mluu510

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 …

Member Avatar for mrnutty
0
142
Member Avatar for anu07

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?

Member Avatar for WaltP
0
46

The End.