49,761 Topics

Member Avatar for
Member Avatar for abey ella

I have spent 3 days trying to get two new functions - GetText() and PutText() to function correctly with no success. Would someone be kind enough to look over my code and see why they do not work. I must have missed something?

Member Avatar for David W
0
118
Member Avatar for Elixir42

Hi, When I initialise then access the `g_spMyLog` shared pointer, from within the `CSingleton::CreateLog` member function, it works ok. Accessing the SP from the static member function of `CSingleton::Create()` causes an `access violation` in the original project and an abort in this sample project displayed below. In the original project …

Member Avatar for Elixir42
0
526
Member Avatar for butterfingerss

I am using Qt5.2.1 and I made a program that stores some data into a file and then reads the data. it stores some variables values. After I restart my program... I want to read those values and re-store the values of those variables... How can I do this? I …

Member Avatar for Moschops
0
2K
Member Avatar for daniel1977

I have a question. I am trying to sere into my brain how pointers work and just when I think I got it a new problem arises. So I think I understand pointers pretty good when working with primitives and such. Now I am trying to understand working with objects …

Member Avatar for sepp2k
0
133
Member Avatar for amt_muk

Hi friends, In Windows if we create an exe with MSVC6.0 a corresponding ".lib" file is generated. This file can be used for accessing (linking) the classes defined within that exe from some outside libraries (dll). Now in unix platform (ie, Red Hat Linux), how can we use that technique. …

Member Avatar for Ancient Dragon
0
117
Member Avatar for oppu.qhar

write a c++ program that print (x,z,T,N) on the form of (*) by usin for loop

Member Avatar for David W
0
155
Member Avatar for johnykf

hello guyz im afraid if i understood this assignment unproperly: could you give me the output of it plz? (how should the output of this assign be) The monthly results for the best 3 employees of the month in a company are sent to the IT department for analysis and …

Member Avatar for David W
0
189
Member Avatar for claush@dut

in the programming world which of the two languages is prefferable in software development ?

Member Avatar for cxzei
0
156
Member Avatar for G.TEJAREDDY

I am new to this and i need an example programs for copy constructor and nesting classes

Member Avatar for panqnik
0
116
Member Avatar for mystycs

How can i make it so that my input only allows either the char a or b. Basically this is what i have now. cout << "Enter either a or b: "; char ab; cin >> ab; cout << ab; But in the event someone enters something other than a …

Member Avatar for mystycs
0
99
Member Avatar for johnas.delacruz

Is there a data type that can allow a user to input a 25 digit number... because the largest data type for numbers that i know is long long int and uintmax_t which can only store 18 numbers (i'm not sure about this)... because my problem should allow a user …

Member Avatar for David W
0
467
Member Avatar for rain27

Need Help.. how to write a program that puts the integer from 1 to N into each circle separately, in such a way that the sum of the numbers in any two adjacent circle is a prime number?? input: the input to the program is a positive, non-zero even integer …

Member Avatar for David W
0
86
Member Avatar for sandeepxd

i want c++ code for a simple window with a tray icon. If i right click the tray icon it should show a context menu containing Exit item and if i click it then application should close. thanx in advance

Member Avatar for panqnik
0
94
Member Avatar for butterfingerss

I am using Qt 5.2.1 and I made a program that takes some values and saves them on a text file. What I want is that everybody can see this file and read the content but nobody can edit it. To edit it, you would have to run the program …

Member Avatar for panqnik
0
296
Member Avatar for ashley.vanhoesen.7

Write the definition of a function named copy that reads all the strings remaining to be read in standard input and displays them, one on a line with no other spacing, onto standard output . void copy() { string x; if(cin >> x) { if(cin != '\n') { copy() } …

Member Avatar for NathanOliver
0
1K
Member Avatar for MiniApocalypse

HI guys! Im making a sudoku game. Ive got all the numbers in a 9 by 9 vector. But im unsure how to proceed. How do i work out which blank space (selected by the mouse) corrisponds with which blank space in the vector? I need it to work out …

Member Avatar for WolfPack
0
147
Member Avatar for kal_crazy

Is it possible to change the value of a const variable? My aim is to change the directory of the Shell. I have set `const char* path = "C:\\"` as current directory. So if the user inputs "gd" then it will ask a directory to be set as the new …

Member Avatar for mike_2000_17
0
321
Member Avatar for Elharts

Hello, I'm currently writing a program that is supposed to add, subtract, divide, and multiply fractions. I've been tinkering with it all day and I just can't seem to get it to work correctly. Right now I'm getting a floating point exception and I have no idea where to begin …

Member Avatar for vmanes
0
459
Member Avatar for Ancient Dragon

Anyone know where to BUY (not steal) this eBook? I don't want paperback because they are too difficult for me to read. I'd rather have eBook or PDF version so that I can change the font size to whatever I want. I've looked at Addison-Wesley web site but don't see …

Member Avatar for mike_2000_17
0
162
Member Avatar for sandeepxd

Hi i am new to c++, i need a code for an application with following specifications. 1. it should use RegisterPowerSettingNotification function and when WM_PowerBroadcast event is recieved then it finds if power source is ac or not. 2. if source is AC then it should execute a program. dev …

Member Avatar for WolfPack
0
107
Member Avatar for TheFearful

I was given a project to do, but I don't understand this notation and am rather confused, so I don't even know where to get started. I am supposed to be using the clock function to see how long it takes for the code below to finish running. Prefix Averages …

Member Avatar for Schol-R-LEA
0
288
Member Avatar for Labdabeta

Hello, Looking at the standard streams provided by the stl libraries, it seems as though it is impossible to have 1 stream to use for both standard console IO and file/string IO. However, before I give up I would like to ask, is this possible: generic_stream stream; stream=cin; //now I …

Member Avatar for Labdabeta
1
545
Member Avatar for butterfingerss

Hello People! I am quite new to Qt (and programming in general). And I am making a program that requires me to encrypt a file and decrypt it after asking for a password through the program. But I have no Idea where to start. What I already have - A …

Member Avatar for sarahwilliams25
0
1K
Member Avatar for Sreya_1

can some one help me with this question.. "The name of students are sorted in an array of strings.Write a program to prepare alphabetically sorted listing of names.."

Member Avatar for Banfa
0
142
Member Avatar for butterfingerss

I am using Qt5.2.1 I made a program that stores some values(like name, number, other details...) in a text file. I want to arrange this information according to the name. Something like this. A Alan 24140239 some_other_info Avril 64376334 some_other_info B bob 532523 some_other_info And so on

Member Avatar for David W
0
210
Member Avatar for Mart_webber

A hardware merchant sells steel bars at a flat rate of Kes 1000.00 per meter, and has announced the following discounts: Quantity of steel bar bought (per meter) Discount (%) <20 0 21-40 5 41-60 10 61-80 15 81-100 20 >100 25 Implement the following programs: a) Using if..else statement, …

Member Avatar for David W
0
224
Member Avatar for mystycs

I have a string and i want to conver the part of it to an int. I want to convert the part of the string `input[1]` to an int. But my compiler cant use atoi, or stoi.. I saw a ifstringstream option i think can work, but i tried implementing …

Member Avatar for tinstaafl
0
325
Member Avatar for trantran

I want to optimize a directory listing input iterator so that the WIN32_FIND_DATA can be written directly to a vector (via emplace) instead of being first written inside the iterator. This is an idea of the code: /* std::vector<WIN32_FIND_DATA> vwfd; struct listing_it:std::iterator<std::input_iterator_tag, WIN32_FIND_DATA>{ HANDLE handle; WIN32_FIND_DATA wfd; auto operator*()->wfd&{return *wfd;} …

Member Avatar for mike_2000_17
0
178
Member Avatar for butterfingerss

I am using Qt5.2.1 and I made a program to do some stuff. In it I added a radio button (named 'others') i want that when the user clicks this button a line edit pops up besides it and lets the user enter some stuff inside it. when the user …

Member Avatar for panqnik
0
134
Member Avatar for baba g

#include<stdio.h> #include<conio.h> #include<dos.h> void print(char c,int x,int y); void main() { char a[3]={'A','L','I'}; int i=0,x=1,y=1; while(i<3) { print(a[i],y,x); i++; } } void print(char c,int x,int y) { int s=1,a; if(c=='A') { while(!kbhit()) { clrscr(); gotoxy(x,y); printf("*****"); gotoxy(x,y+1); printf("* *"); gotoxy(x,y+2); printf("* *"); gotoxy(x,y+3); printf("* *"); gotoxy(x,y+4); printf("*****"); gotoxy(x,y+5); printf("* *"); …

Member Avatar for baba g
0
150

The End.