49,761 Topics

Member Avatar for
Member Avatar for bpacheco1227

I have time to complete this, I have to add 2 void functions, 2 value returning functions, 1 structure and on array. I just need some ideas on where to start, what should I convert to functions, how should I instill stuctures and arrays to this particular program. I'm going …

Member Avatar for mitrmkar
0
198
Member Avatar for dipumali

hi i am dipali i am trying to store multiple objects in file but it will store only one object with the help of read & write function plz tell me solution.

Member Avatar for mitrmkar
0
83
Member Avatar for wussa

[code=cplusplus]#include <iostream> #include <string> using namespace std; char *goodmsg = " I feel fine today \n"; string badmsg = "I am not feeling well today \n" ; int main(){ //prototype definition void printMessage( bool ); //objects declaration bool isFine; bool &isGood = isFine; char *answer = 'y'; //while loop will …

Member Avatar for Daveodolph
0
144
Member Avatar for Quarck

Hi I'm was a c++ programmer for 7 years past with VC++ then go to Java and now return to c++ , I've search for VC++ and its seems big change now (VC++ Express Edition ) . I looking for free VC++6.0 or any other easy/free editor for c++ programming …

Member Avatar for Tigran
0
185
Member Avatar for adRiaNn

Hi guys, I am doing multithreading in my C++ program. Now i seriously STUCK in my program.:confused: Ok, My program have 2 different base class, and each of the base class have a sub class, Example, subclass1 inherited from baseclass1, subclass2 inherited from baseclass2, HOW to make subclass1 and subclass2 …

Member Avatar for adRiaNn
0
78
Member Avatar for krebstar

Hi, I'm just starting out with programming in C++, and would like some clarification on something.. What is the meaning of the '&' in this line: [code=c++]void Stack::push(const StackElement & value);[/code] I would assume that it takes a reference as a parameter, however, why is it that it works when …

Member Avatar for sarehu
0
145
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
91
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
96
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
284
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
343
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
265
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
110
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
105
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
207
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
272
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
174
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
107
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
326
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
211
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
81
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
109

The End.