49,761 Topics

Member Avatar for
Member Avatar for mike_2000_17

[B]Beginner's guide to C++0x: Avoiding Memory Problems by Design of Ownership[/B] If you ever read any resources on C++ programming or object-oriented programming, you must have heard some rethorics like "inheritance is for the [I]is a[/I] relation, composition is for the [I]has a[/I] relation". Is that all? Is that the …

Member Avatar for sergent
8
2K
Member Avatar for satish.paluvai

hi, if any body knows please send the information about L value required error in c++. if anybody knows please send it to <email snipped>[EMAIL="satish.paluvai@gmail.com"][/EMAIL] satish.paluvai:?:

Member Avatar for Narue
-1
268
Member Avatar for bettybarnes

What is the c++ code of this c language code [CODE]printf("%d", b[i])[/CODE] ??

Member Avatar for bettybarnes
0
98
Member Avatar for hailey.o3

this is the output of the program. Enter num1: 2 Enter num2: 2 Enter number of iteration: 2 1=1.5 final answer=2.5 we are assigned to do the program . it's really difficult .

Member Avatar for Fbody
0
131
Member Avatar for ksm092

I am trying to sort a vector of strings in order (one line consists of various strings e.g. 12 10 2010) and was wondering if I would be able to extract individual values from one line of a vector? The way I am doing this is by reading lines from …

Member Avatar for jinhao
0
180
Member Avatar for Cross213

I would like to know how the isFull() function works for a Stack and a Queue, but by implementing the Stack as a dynamic array(without a predefined size) and implementing the Queue as a linked list.

Member Avatar for Cross213
0
1K
Member Avatar for Eagletalon

Hi there everyone, I really hope someone can help me, I am working with Visual C++ with QT libraries and using... well... something that represents MVC (long story)... now I need to pass a const QString& from my 1 controller class to the model of another class... When doing so …

0
75
Member Avatar for Hendo

*sigh* Okay, I'm building a small console app to launch batch files. I have user inputs for selecting the drive letter, and the folder path. The batch files have the same name as the drive letter (i.e. d.bat, e.bat, etc.). [CODE]drvPath = (drive + ":\\" + fpath + "\\" + …

Member Avatar for Hendo
0
185
Member Avatar for termin8tor

Hey all! I'm new to the forum and a little wet around the programming ears so to speak. Anyway I have a question regarding Linked Lists. I know that typically a linked list looks like this: [CODE] struct Node { dataType varName; //data type and variable name Node *next; //points …

Member Avatar for jinhao
0
166
Member Avatar for lastbencher

Hi I installed Visual C++ 2010 express today. There is no option to create a .C file. I tried googling but found nothing. Please help me with this

Member Avatar for mitrmkar
0
306
Member Avatar for Ash11th

Hi Guys !! I'm new to this forum so please excuse me if i'm not posting my problem correctly. I have been given a project to make a program in C++ that solves a given sudoku problem. Here is what i did : [CODE]#include<iostream.h> #include<conio.h> int board[9][9]; int checkrow(int t, …

Member Avatar for Ash11th
0
285
Member Avatar for PratikM

Hey guys, I got the icon thing to work(it was pretty easy actually, you just have to download [URL="http://icofx.ro/"]icofx[/URL] and the [URL="http://www.softpedia.com/progDownload/Resource-Hacker-Download-1520.html"]resource editor[/URL] then load icofx, go to tools, resource editor, click on folder icon, open your .exe file in the Dubug part of your folder, and then click on …

Member Avatar for termin8tor
0
223
Member Avatar for caut_baia

Hi.Someone asked a day or two ago for a way to extract the square root of a number without using the std::sqrt function so i thought about writing my own.Here it is and please feel free to criticize.

Member Avatar for maninaction
0
400
Member Avatar for nuclear

Just recently started learning SDL and have this problem, this program should properly display my background and message on the screen, but instead its just a black screen. Did the Blit, did the Flip, maybe im missing something? Heres the code: P.S i know i might forgot to add some …

Member Avatar for nuclear
0
175
Member Avatar for thecoolman5

hi, i am making a program that kills a process [CODE]system("taskkill /im explorer.exe");[/CODE] and i need to restart the process using CreateProcess. [CODE]CreateProcess(NULL,("C:\\WINDOWS\\explorer.exe"), NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &siStartupInfo, &piProcessInfo);[/CODE] but i keep getting these errors: 27 `siStartupInfo' undeclared (first use this function) and 27 `piProcessInfo' undeclared (first use …

Member Avatar for thecoolman5
0
908
Member Avatar for seamus400

I've found some similar posts on opening different files with the same file stream but they are difficult to understand. I'm trying to figure out for a larger project why I can't use the same file stream as in this example and what an alternative solution may be. And yes …

Member Avatar for seamus400
0
4K
Member Avatar for lukename

hello. Can you recomend me any good OpenGL models type? I would like a type wich would have good editors for that model type and it would be possible to use "skeletal animation" with it.

Member Avatar for mike_2000_17
0
97
Member Avatar for clyo cleopas

[code] //A c++ program that calculate and print parking charges #include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 2; const int numOfMinsPerHour = 60; void inputAndValidate(int,int,int,int); void convertToMinutes(int&,int&,int&,int&); void convertBackToTime(int&); double calcCharge(int&,int&,double); int entranceMinutes,exitMinutes,entranceTimeInMins,exitTimeInMins ; int minutesParked,parkedMinutes,entranceHour,exitHour,parkedTime …

Member Avatar for sfuo
0
110
Member Avatar for clyo cleopas

//A c++ program that calculate and print parking charges #include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 2; const int numOfMinsPerHour = 60; void inputAndValidate(int,int,int,int); void convertToMinutes(int&,int&,int&,int&); void convertBackToTime(int&); double calcCharge(int&,int&,double); int entranceMinutes,exitMinutes,entranceTimeInMins,exitTimeInMins ; int minutesParked,parkedMinutes,entranceHour,exitHour,parkedTime ; …

Member Avatar for VernonDozier
0
186
Member Avatar for Kuroshi

I learned that a boolean does not need all the memory space it is provided in order to display true or false (1 or 0), but since the lowest space computers can work with is byte it was expressed as that. I also read that there are ways to store …

Member Avatar for Fbody
0
186
Member Avatar for RodrigoCSouza

Hi i'm pretty new to c++, but i've been programming in java for a while, i've tried to do a simple drag and drop program that when a file is dropped in the main screen it gets the file path and write it in a TextBox, but i doesn't work, …

Member Avatar for bkenwright
0
498
Member Avatar for L3gacy

I started reading Programming Windows API 5th Edition by Charles Pretzold and I compiled and ran the first program and it worked fine but this one doesn't work and I have been messing with it and I don't know what do anymore, the problem is line 22 when I run …

Member Avatar for L3gacy
0
249
Member Avatar for r.cromwell

I've made a program of basic bank transaction. I'm having a hard time figuring out how will that cin >> newb; and cin >> currentb; work out...the program works if you remove the formulas..also i'd like to add if (withdraw <=10000) the program will stop the user from withdrawing but …

Member Avatar for r.cromwell
0
358
Member Avatar for jt1008

I am trying to rebuild my code for my final project due in 2 hours... I am getting a stray \147 and 148 error, along with various other errors. What am I doing wrong???? I am not very good at this C++ stuff, so any help would be appreciated :) …

Member Avatar for Fbody
0
157
Member Avatar for lttleastig

anyone know how to change network settings like default gateway and DNS? my first idea was to do it from the registry but i read somewhere that it is not good and if OS specific any ideas? thanks

Member Avatar for Ketsuekiame
0
90
Member Avatar for ksm092

This doesnt work as it should... [CODE]void renameMonths(string month) { if (month == "jan") { month = "january"; } } int main() { string month; month = "jan"; renameMonths(month); cout << month << endl; }[/CODE] the output is just jan, when it should be january. Thanks in advance.

Member Avatar for Narue
0
243
Member Avatar for ksm092

This is my code: [CODE] void removeAppointments() { vector <string> newfile; string line; int i; int n; ifstream Appointments; ofstream newAppointments; Appointments.open(DATAFILE); newAppointments.open(newDATAFILE); if (Appointments.is_open() && newAppointments.is_open()) { // Read the file until it's finished, displaying lines as we go. while (!Appointments.eof()) { getline(Appointments, line, '\n'); // getline reads a …

Member Avatar for ksm092
0
187
Member Avatar for rahulvramesh

[CODE]#include<iostream.h> #include<conio.h> class test { public: int data1; char data2; test() { cout<<"contrsuctor"; data1=1; data2='a'; } ~test() { cout<<"destrucor"; } void show() { cout<<"data1"<<data1; cout<<"data2"<<data2; } }; void main() { test *ptr; test object1; ptr = &object1; cout<<"\npointer\n"; ptr->show(); delete ptr; getch(); }[/CODE]

Member Avatar for Cross213
0
119
Member Avatar for ksm092

I am making a program (new to c++) which lets you save contacts and then allow you to list them and remove them. I am lost to how I would number each contact, for example: 1. Sam 21340223 2. Jessica 21020303

Member Avatar for jinhao
0
125
Member Avatar for FriXionX

I have a switch statement set up, with 2 cases (a or v). I could have just done an OR, but decided to practice with switch statements. So far i'm using it to select what letter they type in, then launch the next part of the program depending on the …

Member Avatar for jonsca
0
160

The End.