49,761 Topics
| |
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? | |
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 … | |
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 … | |
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 … | |
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. … | |
write a c++ program that print (x,z,T,N) on the form of (*) by usin for loop | |
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 … | |
in the programming world which of the two languages is prefferable in software development ? | |
I am new to this and i need an example programs for copy constructor and nesting classes | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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() } … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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.." | |
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 | |
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, … | |
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 … | |
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;} … | |
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 … | |
#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("* *"); … |
The End.