49,761 Topics
| |
[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 … | |
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:?: | |
What is the c++ code of this c language code [CODE]printf("%d", b[i])[/CODE] ?? | |
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 . | |
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 … | |
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. | |
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 … | |
*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 + "\\" + … | |
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 … | |
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 | |
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, … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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. | |
[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 … | |
//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 ; … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 :) … | |
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 | |
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. | |
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 … | |
[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] | |
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 | |
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 … |
The End.