49,757 Topics

Member Avatar for
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
194
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
673
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
168
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
120
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
384
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
259
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
134
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
116
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
191
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
214
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
161
Member Avatar for Kausik_1

I am using following C++ code to enter a value of X which is used to print out variable CDF. This C++ code is expected to give very similar value we get from NORMDIST function in excel. However I get following error in debugger with out getting any output in …

Member Avatar for Kausik_1
0
236
Member Avatar for cambalinho

i have these function for create the tooltip: HWND CreateToolTip(HWND hwndTool, string text) { /*INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof(INITCOMMONCONTROLSEX); icc.dwICC = ICC_BAR_CLASSES | ICC_TAB_CLASSES | ICC_WIN95_CLASSES; InitCommonControlsEx(&icc);*/ if (text=="") { return FALSE; } // Get the window of the tool. //HWND hwndTool = GetDlgItem(hDlg, toolID); // Create the tooltip. g_hInst …

Member Avatar for cambalinho
0
776
Member Avatar for cambalinho

i did several ways and nothing work correctly. i have 2 controls: 1 - label: with an animation; 2 - the tooltip is showed on top until the label is re-painted. so is there another way for put the control, always, on top?

Member Avatar for cambalinho
0
224
Member Avatar for cambalinho

see my property constructor: template <typename T> class property { private: T PropertyValue; std::function<T(void)> getf; std::function<void(T)> setf; public: property(const T &value) { getf=nullptr; setf=nullptr; PropertyValue=value; } property(const property &value) : PropertyValue(value.PropertyValue) , getf(value.getf) { } property(std::function<T(void)> GetFunction=nullptr,std::function<void(T)> SetFunction=nullptr) { setf=SetFunction; getf=GetFunction; } inside a class i have 2 functions: void …

Member Avatar for cambalinho
0
189
Member Avatar for tgreiner

I want to read data into an array from a data file. Because I do not know, ahead of time, how much data is contained within the file I need to declare the array at run time using new. My current strategy is the read through the data file to …

Member Avatar for David W
0
480
Member Avatar for biko stevens

i need some help to input some prompting in a ready programm written by someone else for a school,thoughht all night,giving me no errors but the out put is not what i need

Member Avatar for David W
-2
68
Member Avatar for lewashby

I'm reading the book 'C++ Without Fear 2nd Edu' and I'm a little confused on the subject of shallow copies. The book says the problems can arise if you make a shallow copy of an object and something happens to the original, goes out of scope, is deleted, etc... I …

Member Avatar for Moschops
1
168
Member Avatar for Alan_7

**Question-1: Write a program to sort in ascending order random entered numbers by user using Linked Lists. - Size of LL is not limited - Entering numbers should be stopped by entering '0' (zero) - Sort entered numbers using any sorting algorithm (Bubble, Selection or Insertion sort) - Display sorted …

Member Avatar for David W
-2
648
Member Avatar for Utopia_1

Problem Statement: NAtural DIAlogue team at Orange labs has an abbreviation "Nadia Team". This abbreviation causes a big problem for them in Egypt as a lot of Egyptians think this team is owned by a female called nadia and they don't know they are working on NAtural DIAlogue. To solve …

Member Avatar for David W
-3
172
Member Avatar for Mahnoor_1

I need to find out the output of the following code snippet return by function go(2) ... int a=10; int go(int b) { if(b<=4) return b; else return go(b+1)*go(b-2)-(b*2); ++a; cout<<a; return -1; } When I do the dryrun myself on paper , it should first return the value of …

Member Avatar for Mahnoor_1
0
171
Member Avatar for Graceyy Fanning

Hi! I have an assignment. A C++ program. But sad to say I dont know how. -Write a program that multiplies two numbers withou using (*symbol). (Use for loops) Please help me!

Member Avatar for hamzayammu
1
675

The End.