49,755 Topics

Member Avatar for
Member Avatar for tootypegs

Hi, I have a dialog box and basically I have set it so that the user can select multiple file. When it is set to just select 1 file I can get the string for the path of the file by [code] AnsiString LinkPath = (OpenDialog1->FileName); [/code] However when I …

Member Avatar for Duoas
0
55
Member Avatar for cam875

I would eventually like to get into writing my own very simple command line OS but I am looking for maybe somewhere to start. I know C++ but I am not an expert at it and I was wondering if someone could point me in the right direction to getting …

Member Avatar for cam875
0
90
Member Avatar for Momar

Hello all, First post here, I'll try to make it understandable heh. I have a question concerning object creation. Let's say I have a class called Node and I want to create an object called myNode. What's the difference between: [code=c++] Node * myNode = new Node(); Node myNode; // …

Member Avatar for CoolGamer48
0
148
Member Avatar for kux

I've been searching for a memory leak detection tool for windows, something similar to valgrind under Linux, but all tools that i find cost, or just have free trials. Does anyone know a FREE memory leak detection tool for windows ?

Member Avatar for Kob0724
0
184
Member Avatar for FTProtocol

[CODE=cpp] #include <windows.h> #include <iostream> #include "resource.h" #include "Main.h" HWND hWnd, hwScreen; CCalc szCalc; LRESULT CALLBACK MainDlgProc( HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam ); int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { DialogBox( hInstance, MAKEINTRESOURCE(IDD_MAIN), hWnd, (DLGPROC)MainDlgProc ); return 0; } LRESULT CALLBACK …

Member Avatar for FTProtocol
0
89
Member Avatar for kinger29

I was reviewing some material over pointers in a book called [U]C++ Primer[/U] [I]4th Edition[/I] and it said there were four possible values that you can set to a pointer. [LIST=1] [*]A constant expression with a value of 0 [*]An address of an object of an appropriate type [*]The address …

Member Avatar for Salem
0
232
Member Avatar for chanda gul

how do we read the memory at a particular address of a particular device. for example if i have floppy and usb plugged into my system and i want to read the information present at a particular address in usb then how i will do this???

Member Avatar for chanda gul
0
273
Member Avatar for masterjiraya

can someone convert this c++ code to C# code... I'm very new to C# pls help the main.cpp [code=cplusplus]// Main Program // #include "square.h" // Derived Class square int main() { //******************************************************************************* cout << "\t\t\t+y"; cout << "\n\t\t\t +"; cout << "\n\t\t\t +" << "\tpoint a" << "\t\t\t\tpoint b"; cout …

Member Avatar for nvmobius
0
240
Member Avatar for findlay

Hi all, I have encountered a peculiar problem when performing some simple arithmetic in a program I am developing. As the function of the program is pretty specific to my field I have included a smaller program which illustrates the same problem without the technicalities. Given a function (in the …

Member Avatar for Salem
0
145
Member Avatar for cam875

If you were creating a graphic design drawing program for creating small images like 32x32 pixels but the windows was like 600x400. How would you create it so it could have more of a zoomed in vision of the 32x32 image so you could draw on it pixel by pixel …

Member Avatar for Salem
0
151
Member Avatar for TheBeast32

Hi, I'm reading Programming Windows Fifth Edition by Charles Petzold. In the part I'm reading, it talks about GDI functions. I'm trying to get the pixels that are 1 to 100 + the mouse x coordinate and the y coorinate, then draw them on my window. It's hard to explain. …

Member Avatar for TheBeast32
0
138
Member Avatar for William Hemsworth

Hi everyone. Here is a program I made which will find patterns in a list of primes. It does this by finding the difference between each prime and adding them to a vector like this: [CODE] Primes: 2 3 5 7 11 13 ^ ^ ^ ^ ^ Difference: 1 …

Member Avatar for Prabakar
0
156
Member Avatar for Manutebecker

Just wanted to know, I'm just doing a little dice rolling thing thats storing dice values according to how many times they come up every so often, just wondering if instead of making 50 lines of code doing if(sum==1) { ones+=1; } else if(sum==2) {... and so on, I'm thinking …

Member Avatar for VernonDozier
0
109
Member Avatar for Nemoticchigga

I am running a thread that does something, then sleeps for a while. If the program closes it continues to sleep to completion. How do I get it to abort immediatly, even if in the middle of sleeping? [CODE]void commThread::ThreadEntryPoint1() { while(1) { //do work Sleep(15000); //15 second sleep } …

Member Avatar for Tilir
0
104
Member Avatar for sidatra79

Hallo everybody. I am a student trying to extend my knowledge in cPP while using UML and system modelling. I created a "vector template class" using the rhapsody system modeling tool for storing different data types. I used the template to store int and float data types successfully using either …

Member Avatar for sidatra79
0
205
Member Avatar for cam875

how are graphic's API's created such as DirectX and OpenGL. And is using GDI which is the graphic portion of the winapi, a graphic API itself? or are you able to create your own with C++ for 2D rendering instead of using anyone elses. Or does writing an API involve …

Member Avatar for Tigran
0
97
Member Avatar for JackDurden

When I run this program I can only access the first row of data. Can any one help so that I can access all the lines? I am trying to store numbers into a 2-dimensional array. [icode]#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; int main () …

Member Avatar for joshmo
0
213
Member Avatar for robertmacedonia

Hi, I would like to ask you for help in converting this code from C to C++. It's my little friend 's homework, but I can't help him 'cause I know nothing about C :( In fact, I just can't figure the "scanf" part out, I think the other part …

Member Avatar for Tilir
0
172
Member Avatar for QuantNeeds

Hello, I need help to try and figure out why one of my functions does not write to the file. I have 4 functions (below) and all of them write to the file except the updateRecord function. I know this is the case because I keep checking the .dat file …

Member Avatar for Agni
0
157
Member Avatar for srisaravanavel

The below program works fine for a input file that has only one line. but goes to an infinite loop for a multiline file. Kindly suggest. [code][COLOR="Red"] #include<iostream.h> #include<conio.h> #include<fstream.h> void main() { char data[10000]; int i=0; ifstream ofile("c:\\temp\\welcome.txt"); cout<<"File opened\n"; // clrscr(); ofile.seekg(-1,ios::end); while(1) { if(ofile.tellg()==-1) break; i++; ofile.get(data[i]); …

Member Avatar for srisaravanavel
0
106
Member Avatar for Code Shark

Hey. The title displays the error and i was just wondering how i could fix it. Thanks! [CODE=C++]#include "resource.h" IDR_MYMENU MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", ID_FILE_EXIT END POPUP "&Stuff" BEGIN MENUITEM "&Go", ID_STUFF_GO MENUITEM "G&o somewhere else", 0, GRAYED END END IDI_MYICON ICON "menu_one.ico" [/CODE]

Member Avatar for TheBeast32
0
318
Member Avatar for QuantNeeds

I am not sure how to prevent the padded characters within a string array from printing. The user inputs the information in function enterRecords() and then prints in outputLine(ostream &output, const Tools &record ) function. I am having issues with outputline when I try to print to screen and then …

Member Avatar for Ancient Dragon
0
203
Member Avatar for kavithabhaskar

Hi: i am new to C++.. can u help me write a simple program in C++ to take an input of words and just return them in the reverse order..just the words alone not the characters.. thanks Kavitha.

Member Avatar for eSeong
0
80
Member Avatar for CoolGamer48

I'm having problems creating an array with a dynamic size using new. Here is the relevant code: [CODE] enum LandCondition { Bad, Good }; //... int IMG_WIDTH, IMG_HEIGHT; LandCondition* land; //... land = new LandCondition[IMG_WIDTH][IMG_HEIGHT];//causes errors [/CODE] The errors VC++ gives me are: error C2540: non-constant expression as array bound …

Member Avatar for CoolGamer48
0
107
Member Avatar for QuantNeeds

I am having 2 main issues with this function: 1) For some reason my while loop is working but not correctly. If the user enters 0 rather than the while loop terminating and proceeding to the next line of code in the main function, the program begins to repeat infinite …

Member Avatar for Lerner
0
242
Member Avatar for Wiki_Tiki

Hi, I need to know this urgently. My friends like to use my software on their computers, and after they set it up with the setup wizard, when they run the actual program, half of them get an error on their computers saying 'The application has failed to start because …

Member Avatar for Tigran
0
139
Member Avatar for Tigran

Hi guys I don't request any code help, just want to know how they make windows with themes like this: [url]http://www.codeproject.com/KB/library/PrettyWinApiClass/DevStudioSmall.jpg[/url] or like office 2007 Do they do it with winapi, directx, .net or is it possible for all of em' And ehm, another question: does winapi have a future? …

Member Avatar for Tigran
0
142
Member Avatar for prog77

hi , Can someone help me with a program if possible .. I have similar files with file name like prog1.in , prog2.in .... progr100.in which has some 47 rows of data in a txt format (almost same files ). I have another file name file1.txt having 100 rows just …

Member Avatar for VernonDozier
0
88
Member Avatar for rafik790

i have use this function but ReadFile(hComm, &chRead, 1, &dwRead, NULL) chRead does not contain Hex value.

Member Avatar for Ancient Dragon
0
59
Member Avatar for faisaly

Pleae pass the comments on "It is said by some people that insertion and deletion operations in Heaps make them less preferable than Binary Search Trees"

Member Avatar for Salem
0
221

The End.