49,761 Topics

Member Avatar for
Member Avatar for Sarkurd

Hi It's been a while i'm learing C++ but still i have some issue with `Move semantics` and some other stuff. I wrote this class but i don't know why the `Copy constructor` is getting called and the output is a little strange to me, shouldn't the `Move Constructor` gets …

Member Avatar for Sarkurd
0
279
Member Avatar for Lutina

Good day to you all people. I personally like to use Visual Studio and Dev C++ to develop my c++ apps. Recently, I was introduced to a new environment, Textpad as the editor and Cygwin as the compiler. I found interesting that in Visul Studio and Dev C++ you are …

Member Avatar for mike_2000_17
0
271
Member Avatar for ganesh_bala

what is the difference in exit(0),exit(1),exit(2) ? how it differs from Return statement?

Member Avatar for chandanraj
0
689
Member Avatar for Lutina

Good day people. They say the only way you can be a good programmer is if you learn it the hard way, by coding a lot and working on the analytical skills. I believe that all of us in this community have faced some problems in c++ and then were …

Member Avatar for Lutina
0
404
Member Avatar for mike_2000_17

# Introduction # A recurring problem many newcomers face when tackling C++ is the compilation process, from sources to binaries. This tutorial will detail that process. It will be especially useful for people only familiar with higher-level languages (if any), but veterans of one or more native languages (C, Fortran, …

Member Avatar for Lutina
15
8K
Member Avatar for basit_3

hi members please tell me what push_back function do , and why it is use

Member Avatar for Lutina
-1
144
Member Avatar for parkp

is it possible to show c++ coding output which was made in empty project to windows form application program?? I made windows form for example i used spiltcontainer toolbox for panel 2 contains my c++ console output i expect someone's reply thank you

Member Avatar for ddanbe
0
137
Member Avatar for S-e-c-r-e-t

PLZ Don't make mistake about what i'm writing & if u dont understand dont answer plz. I need just a digital clock in C++ with gotoxy &print"****" &... i want to find the difference between this one & the others completely no different if any one just wrote with gotoxy …

Member Avatar for ddanbe
0
589
Member Avatar for rose_2

I want to write a function that displays the frequency of occurrence of an element entered by the user in a stored array. The array always has the following elements: 4, 2, 7, 10, 9, 7, 6, 10, -8, 7, 9. well i wrote this one but i have a …

Member Avatar for tinstaafl
0
143
Member Avatar for S-e-c-r-e-t

I need different source code of digital clock plz exept in graphic forms

Member Avatar for NathanOliver
-1
137
Member Avatar for Ahmed_62

i wrote this code yesterday and i traced it myself but the problem is the array doesn't store any number in it and the output was like this : //convert from decimal to binary #include<iostream> using namespace std ; void main(){ int n,c=0,*pointer,temp=0,r,i,y ; cout<<"Enter number\n"; cin>>n; y=n ; for(;;){ …

Member Avatar for Ion_1
0
287
Member Avatar for parkp

i hope to connect console output to windows form in panel2. i have no idea how to do it... please help me

0
99
Member Avatar for basit_3

i want to get input from a textbox in visual c++ 2010 window form application i try this but it not work private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { std::string m; m==textBox1->Text; MessageBox::Show("developed by basit "); } }; help me plzz

Member Avatar for ddanbe
0
234
Member Avatar for S-e-c-r-e-t

Could anyone help me to write a digital clock in C++ (with some charachters,i mean the time numbers should be made by charachters)? i'm confused

Member Avatar for basit_3
0
420
Member Avatar for phoenix254

Can anybody tell me how can i calculate x decimal numbers of pi, if my input is 2 than output should be this 3.14 if my input is 4 then output is 3.141. I have tried code like this but doesnt work how i want. pi +=3+4/(k*l*m) - 4/(a*b*c); //+ …

Member Avatar for Ion_1
-1
2K
Member Avatar for shafiqkuidad

hello friends i need help in c++ programe i want to print the diamond of the type shown in picture any one help me in this regards............................ if possible then send me email at <snipped email>

Member Avatar for basit_3
0
249
Member Avatar for lewashby

#include <iostream> #include <string> #include <stdlib.h> #include <cstring> using namespace std; class Fraction { private: int num, den; // numerator & demoninator public: Fraction() { set(0, 1); } Fraction(int n, int d) { set(n, d); } void set(int n, int d) { num = n; den = d; normalize(); } …

Member Avatar for Ion_1
0
490
Member Avatar for Ryskie

McCarthy is a famous theorician of computer science. In his work, he defined a recursive function, called f91 that takes as input a positive integer N and returns a positive integer defined as follows: If N <= 100, then f91(N) = f91(f91(N+11)); If N >= 101, then f91(N) = N-10. …

Member Avatar for Ion_1
-2
205
Member Avatar for Emmanuel Atiemo

write a c++ program to acquire scores from a Student and determine the grade based on his/her scores: <30 is fail 31 to 50 is pass 51 to 60 is credit 61 to 80 is very good 81 to 100 is excellent

Member Avatar for basit_3
0
74
Member Avatar for parkp

i made c++ algorithm code. But i don't know how to connect this output which shows in console to windows form application program. please tell me about detail...

Member Avatar for basit_3
0
112
Member Avatar for prahesh

void cAppMath::vregisterFunc(int index, int(*fPtr)(int a, int b)) //Application to register their functions { arrFptr[index] = fPtr; } int main() { appObj.vregisterFunc(EN_ADD, &cAppMath::add); //application that is registering the callbacks. } { Getting follwoing ERROR in vregisterFunc() func call. Error 1 error C2664: 'void cAppMath::vregisterFunc(int,int (__cdecl *)(int,int))' : cannot convert argument 2 …

Member Avatar for deceptikon
0
190
Member Avatar for Fares_1

Hello Guys, I create a small program than allows user to create bank account and add or get money but now i want to edit my code to accept more than one account how can i do it ? #include "header.h" Account::Account(){ int i=0; cout << "To create account enter …

Member Avatar for ddanbe
0
161
Member Avatar for algerino83

i need to create a deck of cards and shuffle it as well and display and sort 4 cards as a hand ahich i have done already please i need to include straight, full house, pair, 3 of a kind and 4 of a kind i have no clue how …

0
103
Member Avatar for purejoy
Member Avatar for markdean1989

Hi guys, after learning that MingW is newer than Cygwin, I immediately switched over to MinGW and deleted my Cygwin file. I have added the MinGW directory into my Path Variable and also separately downloaded the MSYS which contains the make.exe program. Everything seems fine... until when I ran the …

Member Avatar for マーズ maazu
0
132
Member Avatar for nitin1

#include<iostream> using namespace std; class Singleton { static Singleton * s; Singleton() { } public: ~Singleton() { s = NULL; } static Singleton * getInstance(); void print() { cout<<this<<endl; } }; Singleton* Singleton::s=NULL; Singleton* Singleton::getInstance() { if(s == NULL) { s = new Singleton(); } return s; } int main() …

Member Avatar for deceptikon
0
330
Member Avatar for Muhammad Faizan_1

I am trying to write a program that takes unlimited input of names using dynamic memory and stop when the first character is the enter key. i tried, but i am unable to do it. #include "ReadString" void main() { const int NumNames(20); char **pNames; pNames=new char [NumNames++]; for (i=more;i<NumNames;i++) …

Member Avatar for tinstaafl
0
586
Member Avatar for markdean1989

Good day. I was surprised to see that there are no members on objects declared as IFSTREAM and OFSTREAM. I have this code; ifstream indata; ofstream outdata; indata.open(""); outdata.open(""); It can't seem to recognize the member "open". Why is that? Any solution?

Member Avatar for Moschops
0
201
Member Avatar for Petcheco

Hey, guys. Find the sum of all the primes below 2000000. My code: *main.cpp* #include <iostream> #include <vector> #include <cmath> #include "Sieve.h" using namespace std; typedef unsigned long long int ulli; ulli Sum = 0; ulli Sum_of_Primes(vector<bool>, ulli&); ulli Sum_of_Primes(vector<bool> Primes, ulli& Sum) { for(ulli a = 2; a < …

Member Avatar for Petcheco
0
413
Member Avatar for Gayesha

The End.