49,757 Topics

Member Avatar for
Member Avatar for smitsky

Hi. I want to output all of the processes in the printer queue here, and I'm not able to figure out quite how to do that. The only process that shows up is the last one I entered. For instance, if I put a process into printer queue 1 and …

0
123
Member Avatar for umaradam

write c++ program to find sum,sub,mult,div by using function the user will input two number by keyboard

Member Avatar for Ancient Dragon
0
111
Member Avatar for Jsplinter

I have a container object which contains float*. struct MyCon{ MyCon(){ matA = new float[10]; matB = new float[10]; } float *matA; float *matB; } And, I am storing pointers to MyCon objects in a std::map. map<string, MyCon*> myCon_map; myCon_map.insert(pair<string,MyCon*>(string("str"), new MyCon())); Once I am finished with myCon_map, how do …

Member Avatar for JasonHippy
0
613
Member Avatar for rashad fares

i need answer for this Q is that how we can write program in C++ to eccept any number and print it with its digit? and thanx^^

Member Avatar for Ancient Dragon
0
151
Member Avatar for beastie805

really need help figuring out this program, it crashes during the getdata() function in main any tips or suggestions appreciated thank you #include<iostream> #include<string> #include<cstdlib> #include<iomanip> #include<fstream> using namespace std; struct StudentData { string Name; int Idnum; int* Tests; int* TestNo; double Average; char Grade; }; void ReadHeader(int&, ifstream&); StudentData* …

Member Avatar for Ancient Dragon
0
190
Member Avatar for glao

Hello , I can't figure how to properly measure time execution when I have 2 loops and I want to measure the time for the innermost loop: for (int i = 1; i <= N; i++) { ..... clock_t begin = clock(); for (int j =1; j<= M; j++){ //want …

Member Avatar for Suzie999
0
453
Member Avatar for cambalinho

by the book, i read that with WM_SIZE message i can get the client size instead use the GetClientRect() function: case WM_SIZE: GetClientRect (hwnd, &rect) ; VerticalScrollSize=rect.bottom; si.cbSize = sizeof(si); si.fMask = SIF_ALL; GetScrollInfo (hwnd, SB_VERT, &si); si.nMin = 0; si.nPos = VerticalScroll; si.nMax = VerticalScrollSize-2; si.nPage=2; SetScrollInfo (hwnd, SB_VERT, …

Member Avatar for cambalinho
0
237
Member Avatar for Milton Neal

I'm working on a bit vector class that I'm using in a current project. Basicly BitVector is a container class for storing and manipulating data a bit level. I have two member fuctions for "setting" and "getting" bits at a given index. // Returns the bit at the specified index. …

Member Avatar for Milton Neal
0
310
Member Avatar for Patrick_6

Hi everyone, I wanted to write C++ a program that's going to logon to my twitter and alert me if I have any new messages or tweets. I found an article that explains how to log on to a website with libcurl, https://www.hackthissite.org/articles/read/1078. Using that article I've written a simple …

Member Avatar for Patrick_6
0
784
Member Avatar for adampday

Hello, I was wondering how to pass an array to a class constructor. When I run my program, I get the same gross pay for every different employee even if I enter in a different number of hours for each one. That might be where I have a problem. Any …

Member Avatar for wrathness
0
103
Member Avatar for Rahul47

Hello folks, I came across [Chaiscript](http://chaiscript.com/index.html) which promises scripting within C++. I am not able to figure out how it will be compiled or interpreted. Anyone have any idea ? Thanx.

1
93
Member Avatar for Sinan_2

I am new to Qt and I'm trying to connect a remote database. QSqlDatabase db = QSqlDatabase::addDatabase( "QMYSQL" ); db.setHostName("IP ADRESS"); // local or IP db.setPort(3306); // Default port is 3306 db.setUserName("DB USER"); // example root db.setPassword("PASSWORD"); db.setDatabaseName("DB NAME"); if( !db.open() ) { qDebug() << db.lastError(); qFatal( "Failed to connect." …

Member Avatar for BobS0327
0
2K
Member Avatar for TheFearful

I am trying to create a 2-3 tree using an insert function and I am stuck beyond this point. I am able to get the first node with the small and large value, but I do not know what do to from here. Any advice/tips? #include <iostream> using namespace std; …

0
93
Member Avatar for cassie_sanford

I have to write a program that must compute and display the charges for a patients hospital stay. first the program should ask if the patient was admitted as an in patient or an out patient. If the patient was as an in-patient the following data should be entered: the …

Member Avatar for rafiq_1
0
825
Member Avatar for cambalinho

i'm testing the win32 scrollbars, but i'm with 1 problem: when i use the SB_THUMBPOSITION message, why the window isn't repainted( the WM_PAINT message isn't used)? case WM_VSCROLL: switch (LOWORD (wParam)) { case SB_LINEUP: VerticalScroll-=1; break; case SB_LINEDOWN: VerticalScroll+=1; break; case SB_THUMBPOSITION: VerticalScroll=HIWORD (wParam); break; case SB_PAGEDOWN: VerticalScroll+=10; break; case …

Member Avatar for cambalinho
0
972
Member Avatar for TheFearful

I am confused on how to implement this. I was thinking a loop, but the loop I was doing would only fill the array and make the stack full. Any tips/suggestions I can use to help me get through this mental block? I put the code for all three of …

Member Avatar for TheFearful
0
212
Member Avatar for Traffkk

I need help. I just finished with the c++ tutorial on learning c++ syntax. So my question is what do I do next. I wanna learn

Member Avatar for Ancient Dragon
-2
159
Member Avatar for Saba _1

Hey guyz, I've done with some coding, actually I've to submit it in the project form, what the question arises is that I dnt know where and what's the mistake in the coding. please help me out. but it's necesaary to do traversing through linklist. My topic is 'Departmental store', …

Member Avatar for richieking
-1
207
Member Avatar for lena1990

hi all i have ekiga open source code that i want to modify but when i open the downloaded code in the text editior all i get is rubish i download the source from this website [Click Here](http://ekiga.org/download-ekiga-binaries-or-source-code) thanks in advance

Member Avatar for lena1990
0
312
Member Avatar for Rubinder singh

I used to have turbo c++ but it is outdated now, so the only problem i am having with that is that there was a great help documentation in turbo c++ for the language and i could just browse to any function of c++ and get its details. After turbo …

Member Avatar for vmanes
0
3K
Member Avatar for iamthwee

Here is a simple Polynomial class. Its purpose is to show how one can [B]simply [/B]create a Polynomial class without using abstract datastructures such as linked lists etc. Each term is printed out in order of its power - from highest to lowest. Inspiration was taken from a Java source …

Member Avatar for parisa_hr
2
14K
Member Avatar for Alxprog

In my book a new tabpage is created programmatically this way: auto tabPage3 = gcnew System::Windows::Forms::TabPage(); but I want to do it without "auto" word because that's a new 2010 feature and I use VS2008. The MSDN solution didn't help. I hope it'll take just a little tweast to solve …

Member Avatar for Alxprog
0
231
Member Avatar for smitsky

If I prompt the user for n number of printers, is there a way of creating n number of vectors on the fly as opposed to creating vectors and putting them in your class structure at the start? I have to create as many printer queues as a user specifys. …

Member Avatar for smitsky
0
202
Member Avatar for Alxprog

There are tips on how to install Boost with Visual Studio, there are tips on how to install Boost with Qt , so my questions is : is it possible to install and later work with Boost with the two IDE's mentioned above ( I have them both on my …

Member Avatar for Alxprog
0
124
Member Avatar for huzeifa
Member Avatar for javed.iqbal.3979

Hi coders,,, I have to find mean,mode and median of a 2-D array : 2 5 2 5 9 5 8 3 6 10 8 1 10 10 7 1 4 4 3 8 4 3 1 2 4 10 3 9 8 5 6 10 8 3 6 10 …

Member Avatar for Ancient Dragon
0
518
Member Avatar for Q8iEnG

Hi guys.. I'm still going through C++, learning new stuffs. It is true that I have finished my C++ course two years ago. But, you all know C++ have too much things to learn! Anyway, I need help guys "kindly" how can I open a program/or any file using C++? …

Member Avatar for shayan_doust
0
738
Member Avatar for 111100/11000

//**numHits and numHalfHits give incorrect values.I don't know why** #include "Mastermind-game.hpp" using namespace std; int main() { bool choice = false; cout << "This is a game of MASTERMIND v.0.1" << endl; while(1) { cout << "Enter 1 if you want to solve game for your self" << endl; cout …

Member Avatar for nullptr
0
537
Member Avatar for mahabelg

i'm trying to enter a string phrase and store its last word in an Array, if the word is palindrom then a message will showit

Member Avatar for iamthwee
0
373
Member Avatar for salamjamal10

Hello all, I just want to make sure if my answer to this question is right or no. If no please help me solve it. Thanks in advance. Here is the problem: What is the output of the following psuedocode num1 = 5 num2 = 1 num3 = 4 aQueue.enqueue(num2) …

Member Avatar for saeid_h
0
156

The End.