49,766 Topics

Member Avatar for
Member Avatar for Mahnoor_1

I have a little confusion in my mind. I know very well the difference between preincrement and postincrement, postdecrement and predecrement. But i wonder how do these operators work during loop. I ,myself, use postincrement or decrement in loop as follows: for(int i=0;i<5;i++) { //code } But in my book …

Member Avatar for Mahnoor_1
0
282
Member Avatar for can-mohan

Hi All, in below class i wanted to have two friend function(overloading) one with default argument and other is without default argument. but during compilation it gives error. could you let me know how to fix (overload) this by not changing the function name , argument type or number of …

Member Avatar for rubberman
0
288
Member Avatar for Cleophas_1

write a c++ program to compute compound interest. the program should be structured as follows A function to compute interest and another function to compute amount **Bold Text Here**

Member Avatar for Cleophas_1
-1
524
Member Avatar for Hector3000

Design a C++ program by considering the following conditions; 1. User must keyed-in “start” to start the program and “stop” to end the program. . 2. If the user keyed-in “choice1”, print out PATTERN A. 3. If the user keyed-in “choice2”, print out PATTERN B. Use if else statement, while …

Member Avatar for Moschops
0
138
Member Avatar for Zcool31

Hello Everyone! I'm using C++ to write a small 2D app with SDL and OpenGL. I'm trying as much as possible to keep my code cross-platform. However, I've hit a bump. I can't find a good, easy way to display text on the screen. I am able to do it, …

Member Avatar for BeautyBeast
0
1K
Member Avatar for usmanjani

C++ HELP: hello i made a program where user enter any message then fing its frequency and push it on the queue and sort it i want to sort it again by which element in the same piority entered please anyone can help>? for example for this message: "Eerie eyes …

Member Avatar for usmanjani
0
252
Member Avatar for can-mohan

Hi All, I know this is very silly question about singleton pattern but still it is first choice of interviewer. Could you let me know in below code snippet. (1) After deleting singleton object why still i am able to call show() method and it works fine. delete obj; obj=NULL; …

Member Avatar for Moschops
0
200
Member Avatar for Brahim_2

hi all i am new in qt/c++ i am trying to build a program with database using QTableView QLineEdit QComboBox.. the LineEdit shows a valiu the records filtered by that valiu.. now the ComboBox displays somenames with valius and what i want is that when i change the valius in …

Member Avatar for richieking
0
158
Member Avatar for Puru_1

I am getting below errors while compiling on V2013. I have benn struggling it for last 5 days. Any help much appreciated. ------------------------------------ error LNK2001: unresolved external symbol "double pnl::global_fakedummy" (?global_fakedummy@pnl@@3NA) 1>snpgm.obj : error LNK2001: unresolved external symbol "private: static class pnl::LogMultiplexor * pnl::LogMultiplexor::s_pStdMultiplexor" (?s_pStdMultiplexor@LogMultiplexor@pnl@@0PAV12@A) ------------------------------------------------------------------------------------------------ pnlFakeptr.hpp #ifndef __PNLFAKEPTR_HPP__ #define …

0
93
Member Avatar for John A

User input/output is a key component in the programs you write, yet most online tutorials just provide a quick-and-dirty method of grabbing data. In other words, it works right up until the point the user does something unexpected. In this tutorial you will learn how to avoid the common mistakes …

Member Avatar for Khawaja Ghulam
11
7K
Member Avatar for cambalinho

(i'm using win7) i can use the Region functions for get the transparent control. but, in some cases, i can get bad resoltes(. i have read that i can use brushes for get the transparent control. can anyone explain better?

Member Avatar for triumphost
0
955
Member Avatar for iansane

Hi, I am writing a program to read from a file. I want to ask the user for the file name to open. I have tried to use the basic open file code from cplusplus.com and it won't work unless I specify the file name in the code. If I …

Member Avatar for Jaja19
0
17K
Member Avatar for Warrens80

So this friend, the boyfriend of another friend, is interstd in acareer as an IT, he knows quite a lot but wants to learn C++ so I reccomended Daniweb as a source of information. I don know I dont if he will join but I'm spreading the word about Daniweb.

Member Avatar for <M/>
0
145
Member Avatar for Nithin_1

Hi all, I'm new to this forum. I'm learning C and embedded SQL. I have a question. In one of the project am doing, i want to check whether any records with a particular local_id and global_id is there in the database with in the last 90 days. If it …

Member Avatar for Frederick2
0
199
Member Avatar for nathan.pavlovsky

Hi all! I am working on creating an SMS language translator (SMS -> real English), and I am having trouble initializing a map for the SMS -> English codes. My code is below: map<string, string> THE_SMS_CODES{ ".02","Your (or my) two cents worth", "10X", "Thanks", "2MI","Too much information", "2U2" ,"To You …

Member Avatar for nathan.pavlovsky
0
685
Member Avatar for XP78USER

This might sound crazy or something, but i've always wanted to build an Operating System like Windows where people can do everyday things I know some people do not like the new Operating System and that the new screens look atrocious. Also I need a group at least five or …

Member Avatar for Schol-R-LEA
0
172
Member Avatar for usmanjani

how to make this pagehttps://www.facebook.com/ on console screen and also set the size of cotrol screen to window size???????? i anyone can help i all apricate it?

Member Avatar for usmanjani
-1
121
Member Avatar for Ali_50

hello guys i have a favour to ask i would like to help me out with this problem .. 4) Write a method binaryToDecimal that takes a string as argument (the string consists of a sequence of ’0’ and ‘1’ characters representing the binary representation of a number) and returns …

Member Avatar for Moschops
0
159
Member Avatar for can-mohan

Hi, As we know constructor doesn't have any return value so it is not good idea to perform exceptional handling inside constructor.SO i would like to know if i am opening a file inside constructor and due to some reason (file not exist) failure happened inside constructor then how to …

Member Avatar for can-mohan
0
391
Member Avatar for tinsaea

In turbo c++,how can i copy a certain file from one drive to the other e.g,the file is located in G:\one ,i want to copy it to C:\tc the file name is "file.txt"...Much love

Member Avatar for vijayan121
0
263
Member Avatar for TObannion

I'm working on a project for a tic tac toe game. I'm working on this with a partner (assigned) but he has kind of fallen by the wayside. Here is the assignment: Filenames: ttt.h, ttt.cpp, tttmain.cpp Your second project will be completed with a partner. For this project, you will …

Member Avatar for tinstaafl
0
2K
Member Avatar for Sarkurd

Hello. I have a few Qs about Hash tables. how does `std::hash` return a `std::size_t`? for example how does it convert a `std::string("Hello")` to `std::size_t`? How do these functions work? i have no idea what's `hash_combine` and `seed` do in `hashval.hpp` This is from STL 2nd edition. hashval.hpp #include <functional> …

0
135
Member Avatar for James_47

Hello I am tring to write a code to generate random numbers into an array, I don't understand why this isn't working. please help #include <iostream> #include <ctime> #include <cstdlib> const int NRows = 5; const int Ncols = 5; using namespace std; int main() { //declare variables int num[NRows][Ncols]; …

Member Avatar for StuXYZ
0
117
Member Avatar for usmanjani

title says all.......! oid diamond(int n); // where n is the number of stars in the middle row what it shows me

Member Avatar for usmanjani
-2
121
Member Avatar for usmanjani

void diamond(int n); // where n is the number of stars in the middle row. You can assume that n is odd. (You can change the prototype of the function diamond)

Member Avatar for usmanjani
-1
192
Member Avatar for hansinimaya

please give me some[Click Here](http://www.facebook.com) # student #

Member Avatar for rubberman
-2
62
Member Avatar for Dave Sinkula

With regard to C++ books, I'll just echo the advice here .The following books are recommended; read them in mostly the order listed." Accelerated C++ " Andrew Koenig & Barbara Moo " The C++ Standard Library " Nicolai Josuttis --- a "must have" " Effective C++ ", " More Effective …

Member Avatar for shahidali6
11
10K
Member Avatar for William Hemsworth

Quite a while ago, I made [URL="http://www.daniweb.com/code/snippet217147.html"][B]this[/B][/URL] snippet. This code is basically the same, except that it adds animation. This method of blitting is very fast assuming you don't use a surface that's too large. On a 500 x 500 surface, I managed 350fps using only 0-1% of the cpu. …

Member Avatar for thetukiet
1
7K
Member Avatar for it@61@sec

Does C++ have predefined text constants / string constant to be used as replacements for digits when testing errorcodes ? An example: if (errcode == 17){ std::cout << "The file already exists!" << std::endl; } To make it more readable I can write: if (errcode == FILE_ALREADY_EXISTS){ std::cout << "File …

Member Avatar for vijayan121
0
216
Member Avatar for hadisur_rahman

# What's the problem in output where the algorithm was correct ???? # #include<iostream> #include<stdio.h> using namespace std; main() { int LA[100],K=1,N=5,L;//K=POSITION...N=element for(int i=0;i<=4;i++) { cin>>LA[i]; } L=LA[K]; for(int J=K ; J<N-1; J++) { LA[J]=LA[J+1]; } cout<<"DELETE ITEM:"; N=N-1; for(int P=0;P<=4;P++) { cout<<" "<<LA[P]; } }

Member Avatar for StuXYZ
0
162

The End.