49,757 Topics

Member Avatar for
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
283
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
396
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
490
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
238
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
185
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
Member Avatar for ksm092

When I want to access a part of the vector (appointment) it won't allow it, for example simply adding: [CODE]cout << appointment[1];[/CODE] will not work. I also want this vector to be saved to my class (Appointment), so I can later remove elements of the vector. Would I be able …

Member Avatar for VernonDozier
0
246
Member Avatar for dusktreader

I am having some trouble getting some overloaded operators working correctly with a simple inherited Vector class (numerical vector, not container) The scalar multiply from the base class doesn't appear to be visible to the derived class. Code follows: Base Class Header [code=c++]#pragma once #include <vector> class Base { protected: …

Member Avatar for GreenRiver
0
3K
Member Avatar for ben1996123

I just watched this tutorial: [url]http://www.youtube.com/watch?v=NTip15BHVZc[/url] and tried it myself, but I could not get it to work, I get these errors: [CODE]||=== 15. Placing classes in separate files, Debug ===| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes in separate files\src\testClassFile.cpp|1|error: testClassFile.h: No such file or directory| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes …

Member Avatar for ben1996123
0
1K
Member Avatar for ksm092

I am trying to add a numbering system to a list in a datafile: [CODE] Appointments.open(DATAFILE); if (Appointments.is_open()) { // Read the file until it's finished, displaying lines as we go. while (!Appointments.eof()) { getline(Appointments, line, '\n'); // getline reads a line at a time appointment.push_back(line); cout << i << …

Member Avatar for ksm092
0
91
Member Avatar for PratikM

Hey guys, I made a program and i was just wondering how to change the icon because right now all its showing is the application file icon. So Any help is appreciated. Thanks! P.S: I already tried resource hacker, and I probably did something wrong but it didn't work.

Member Avatar for jonsca
0
345

The End.