49,757 Topics

Member Avatar for
Member Avatar for atulnain007

# Hello Daniweb Users, # I am a highschool student and is corrently doing a project in **C++**. My project is a simple bank management system. I want my program to generate random account numbers for new users. But in a single run i am able to generat only 1 …

Member Avatar for rubberman
0
182
Member Avatar for Abhinisha

what are nested classes? and flush program and poker program .. using a suitable program ..kindly tell me??

Member Avatar for rubberman
0
146
Member Avatar for daino

I'm just wondering what everyone thinks about building from the command line. I've been using Code::blocks with a MinGW compiler but there always seems to be a myriad of problems in building projects. I'm starting to become a little fed up with it's querks though it is probably partially my …

Member Avatar for rubberman
0
255
Member Avatar for th3k1d

I am currently learning c++ on my Mac started with eclipse and playing with Qt some recently. I am wanting to switch over to Linux. I was wondering what is the recommend Linux destro that c++ programmers are using. I will need to do some GUI programming. So I guess …

Member Avatar for mike_2000_17
0
240
Member Avatar for soche123

how come compiler is displaying this problem even though I've declared the array. #include <iostream> #include <conio.h> using namespace std; void toBinary(long long decimal, int binary_number_array[], int & NumBinaryBits); int main() { long long decimalNumberToConvert[1] ; cout<<"Enter a decimal number"<<endl; cin>>decimalNumberToCovert[1]; int sizeBinaryNumber, binaryNumberArray[100]; toBinary(decimalNumberToConvert, binaryNumberArray, sizeBinaryNumber); //Printing out the …

Member Avatar for tinstaafl
0
118
Member Avatar for adil.ghori

Hello ! I have a script, that i m running on visual C++ compiler everything is alright with it, working properly but in the result, I can see on one digit after decimal, not 2, i wanna display two digit i.e 31.02 ; Code is; # include <iostream.h> # include …

Member Avatar for adil.ghori
0
382
Member Avatar for eldiablo1121

Hello, First of all I want to thank all the help with my posts. I have a program where I have to convert a phrase from lower case to upper case, but I cannot use any of the toupper() isupper() functions and vice versa. I think I almost got it, …

Member Avatar for eldiablo1121
0
2K
Member Avatar for eldiablo1121

Hello, I have a program assignment that I have no idea what it's asking for honestly. I've tried to read all I can about it, but I do not understand. I tried my hand at some code, but it's only returning the address of course. Here is my attempted code: …

Member Avatar for eldiablo1121
0
422
Member Avatar for vishalonne

Hello I have 4 problems to solve out of 4 I solved 3 but problem mention below is painfull, I am not able to find how I will interchange the '+' '-' operator. I need some code. I am using Turbo C++ Write a C++ function having two value parameters …

Member Avatar for Ancient Dragon
0
178
Member Avatar for achava

I have a class cyclotomic{public: int p; int *cyclonumber; ??? createZetas(void} Obviously there is more to the class. For intance when a class is constructed, the cyclonumber pointer is newed into an array of size p-1. Everything is public. The function createZetas is supposed to create and return a newed …

Member Avatar for achava
0
200
Member Avatar for christinetom

Would anyone know where I could get a really extensive coverage of pre-processor directives? There are plenty of websites but the information is limited. Was hoping there was a complete source like a book out there. Thanks everyone.

Member Avatar for rubberman
0
186
Member Avatar for nathan.pavlovsky

Hellp programmers! I'm trying to create a program that displays the impact of changing the rate of compound intrest using the historical example of Manhattan's aquisition as an example. The code is below: int main() { double amount=0; //amount on deposit at the end of each year double principal=24.00; //initialize …

Member Avatar for gusano79
0
366
Member Avatar for modaresi

Right now, this program asks the user to enter the input infile and outfile file names. Then it gives an error if it can't open the file. If it can open infile, it reads the first value and consider that as the array size. After that it continues with other …

Member Avatar for Ancient Dragon
0
410
Member Avatar for Antriksh_1

#include<iostream> using namespace std; class A { int a[]; }; int main() { cout<<sizeof(A); return 0; }

Member Avatar for mike_2000_17
0
239
Member Avatar for mahesh113

Hi, Please tell me in the following question why no copy constructor is called when fun returns the A object. While returning b and constructing c, there is no copy constructor called. Why?? #include<iostream> using namespace std; class A { public: A(){cout <<"Default\n";} A(const A&){ cout<<"copy\n"; } A fun(A a) …

Member Avatar for mike_2000_17
0
336
Member Avatar for Garrett2011

Hello I encountered following info at [this page](http://en.wikipedia.org/wiki/Call_stack#Overlap): For some purposes, the stack frame of a subroutine and that of its caller can be considered to overlap, the overlap consisting of the area where the parameters are passed from the caller to the callee. In some environments, the caller pushes …

Member Avatar for sepp2k
0
317
Member Avatar for Echo89

OK, I have an idea of what I might do: I'm planning on making a Event handling system, and this is how I will connect events to functions and be able to send any type of data. This is the basic idea: #include <iostream> template <class T> T *from(void *data) …

Member Avatar for Echo89
0
229
Member Avatar for arunkishorres

Error 2 error LNK1120: 1 unresolved externals Error 1 error LNK2019: unresolved external symbol "bool __cdecl identical(class cv::Mat,class cv::Mat)" (?identical@@YA_NVMat@cv@@0@Z) referenced in function _main this is the error i am getting...tried a lot but still couldnt corrrect it...referred many sites, a guy had this same error but nobody managed to …

Member Avatar for Moschops
0
344
Member Avatar for modaresi

Here is what I want this program to do: Be able to calculate mean, standard deviation, and median. Data should be sorted using insert sort first though. The program must be able to accept input from an input file and print a report to an output file. These files are …

Member Avatar for modaresi
0
528
Member Avatar for maalaakhantaurux
Member Avatar for irfan_ncp

Dear what is the difference between . and -> in C++ and where we have to use these. regards Nouman

Member Avatar for rubberman
-1
168
Member Avatar for mahesh113

Hi All, Why the output of the following program is 0231?? Please resolve my doubt. #include <iostream> using namespace std; class B { int data; public: B() { data =0;} int func(){cout<<data++;return data++; } }; int main() { B b; cout<<b.func()<<b.func()<<endl; return 2; }

Member Avatar for rubberman
1
129
Member Avatar for MasterHacker110

I am trying to display the files and folders in a directory. And if the folders have a nother folder, display those contents also, and so on. I have this code but it isn't working the way I would like it to: #include <Windows.h> #include <string> #include <iostream> using namespace …

Member Avatar for Ancient Dragon
0
318
Member Avatar for khiemkim.xuan

Hi all! I'm trying to get some inspiration on how to make a simple e-mail program either very simple or with extra extensions. Please give me som inspiration people ;) Thanks!

Member Avatar for pbj.codez
0
74
Member Avatar for sireiz

#include<iostream.h> #include<fstream.h> class studentinfo { private:/*Creating Private Data Members */ char* VUID; char* campusID; char* Studentname; char* Fathername; public: void Storefile();/* Function to Store Data in the File*/ char Display();/*Function to Read and then Display Data from the File*/ studentinfo(char*, char*, char*, char*);/*Constructor to initialize Data Members*/ ~studentinfo(); }; /* …

Member Avatar for sireiz
0
430
Member Avatar for adil.ghori

Hello Everyone ! I want to Create a program that will calculate and print to the screen a sales receipt. The user will enter in the number of sales items, the price for each item and the sales tax percentage. Can Anyone Help me Out? Thank You

Member Avatar for lindajane
0
247
Member Avatar for ztdep

Dear friends: I write a parallel program with the PETSc, it can compiled sucessfully with the following command. could you please help me to translate it into a cmake file. so i can further develop the code in kdevelop4.4. mpic++ main.cpp -o main -I/home/ztdep/Downloads/petsc-3.3-p6/include -I/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/include -Wl,-rpath,/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib -L/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib -lpetsc -lX11 -Wl,-rpath,/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib …

Member Avatar for MonsieurPointer
0
155
Member Avatar for Ram J

This program is sorting a randomized array of integers using the bubblesort algorithm. a) Try to understand the structure of the source code. Compile and run the program. b) Simplify the code and correct the program. Also the program logic can be improved! c) Modify the source code, so that …

Member Avatar for MonsieurPointer
-1
162
Member Avatar for CPT

currently I have a class function: class MyClass{ static int E(int A,int B, int C){ //function code } }; //and I call it like this : MyClass::E(1,2,3); //what I would like to do is call it in this way: E(1,2,3); //my current macro definition is this #define E(a,b,c) Myclass::E((a),(b),(c)) how …

Member Avatar for JasonHippy
0
308
Member Avatar for mahesh113

Hi All, Pleas tell me why the following program is giving 35 as output?? if fun() returns int type then it is compilation error. why? #include<iostream> using namespace std; int &fun() { static int x = 10; return x; } int main() { fun() = 30; cout << fun(); return …

Member Avatar for Labdabeta
0
121

The End.