49,761 Topics

Member Avatar for
Member Avatar for ~s.o.s~

Hello to all programmers out there. Considering the growing request for practice problems by the beginners, we ( Me, Joey, Niek, Aaron..) have decided to start a sticky which will host some common practice problems which would help the beginners in understanding the programming concepts in a better way. (Did …

Member Avatar for gyno
22
7K
Member Avatar for anumash

I am defining a class outside a function and inside a function and returning the address of the object using new to main. I have no problems when the class definition is outside any objects but when I initialize the class definition within a function I am getting errors, this …

Member Avatar for David W
0
207
Member Avatar for GeorgiosMeNTUA

I have an image (frame.bmp, uncompressed, resolution 640*480, 3bit depth, 900KB size) stored at C:\Frame.bmp. I want to load it and put it in my program as an array a[N][M], N=479, M=639. After that to modify its elements (e.g thresholding) and create a new array B[479][639]. Finally, to store it …

Member Avatar for triumphost
0
7K
Member Avatar for anumash

I want to declare an ordinary pointer (not a member pointer) to a member function. I have tried but apparently I am getting errors. Is this allowed in C++? Why is it not? #include<iostream> class A{ private: int m; public: void show(void){ std::cout<<"M= "<<m<<std::endl; } }; int main() { A …

Member Avatar for anumash
0
253
Member Avatar for Toheed Rana

how to prepare a result card in dev cpp??? i want help. any one programmer plz?

Member Avatar for rubberman
0
112
Member Avatar for herge

Hello: I have just down loaded a help library for vc2010 C++ it took two days to download. I compiled a CPUID program from Microsoft. 08/25/2015 03:40 AM <DIR> . 08/25/2015 03:40 AM <DIR> .. 08/25/2015 03:35 AM <DIR> CPUID 08/25/2015 03:41 AM 26,759,168 CPUID.sdf 08/25/2015 03:33 AM 887 CPUID.sln …

Member Avatar for NathanOliver
0
145
Member Avatar for anumash

I wrote the following program to access an object's private members via its address. How is it possible that the following code did not give me *ANY* error? The code compiles and gives me the right answer. Does this mean C++ is inferior to other languages in its ability to …

Member Avatar for ddanbe
0
276
Member Avatar for TheChessDoctor

I created a simple cpp file with no errors (hello world project) but it won't launch. #include <iostream> using namespace std; int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! return 0; } here is the video of it: [Click Here](https://www.youtube.com/watch?v=CrJD-ZNpqI0&feature=youtu.be)

Member Avatar for syncster31
0
169
Member Avatar for Varad_1

I am a kid of 15 and just started learning cpp. I want to make a simple programme wherby if i say hi to the computer it must respond by saying hello to me. So please give the coding or programme for it.

Member Avatar for David W
-2
163
Member Avatar for cambalinho

i'm converting the VB6 DIB code to C\C++ from: http://www.tannerhelland.com/42/vb-graphics-programming-3/ **V – Using DIB Sections** but doing by steps... how can i convert: ReDim ImageData(0 To 2, 0 To bm.bmWidth - 1, 0 To bm.bmHeight - 1) to C\C++? for then use it on GetDIBits() function

Member Avatar for rproffitt
0
113
Member Avatar for cambalinho

i'm getting flickers on windows. the windows have CW_USEDEFAULT size and i use the WS_CLIPCHILDREN. on WM_PAINT i use my image class with client rect size. it's big. but not more big than screen. the WM_PAINT: case WM_ERASEBKGND: { return (LRESULT)1;; } break; case WM_PAINT: { PAINTSTRUCT ps; BeginPaint(inst->hwnd, &ps); …

Member Avatar for cambalinho
0
716
Member Avatar for Dasun_1
Member Avatar for Dasun_1
Member Avatar for StuXYZ
0
182
Member Avatar for Noxes

I am currently using Dev C++ program for the program I write in. I was wondering if there are any free download programs out there that are a text editor? I mean by giving it a black background, certain key words are highlighted to different colors? I know there is …

Member Avatar for ChampRocks
0
2K
Member Avatar for trushenion12
Member Avatar for Lucaci Andrew
0
111
Member Avatar for Dasun_1

how to find general equation of intersection of two planes?

-1
89
Member Avatar for Dasun_1
Member Avatar for guest7

Hi, I wish to compare partial bits of two one dimensional vectors. I know how to compare the two vectors completely. [ICODE]int main () { std::vector<int> vector1; std::vector<int> vector2; int out; vector1.push_back(100); vector2.push_back(101); vector1 == vector2 ? out = 0 : out = 1; printf("out = %d \n", out); return …

Member Avatar for Dasun_1
0
30K
Member Avatar for anumash

I get the fact that arrays are NOT the same as pointers but when an array is used as an rvalue it is implicitly converted to a pointer. I used the above to write a program to store a 1-D array's address in a pointer variable. Below is my code: …

Member Avatar for tinstaafl
0
275
Member Avatar for New Jack

My program is to solve the simple problem in the Link[http://codeforces.com/problemset/problem/143/A] #include <stdio.h> #include <cstring> #include <math.h> #include<set> #include<iostream> #include<algorithm> #define MAXN 25 #define INF 100000000 using namespace std; struct _point { int L;int r; bool operator<(const _point &a)const{ return (this->L<a.L); } }; set<_point> up,down; int r1,r2,c1,c2,d1,d2; void solve(){ _point …

Member Avatar for Moschops
0
192
Member Avatar for Daniel_46

I'm trying to compile an old project in Borland C++ Builder 4. I have a working exe and the source files for that, therefore someone must have managed to compile it earlier. However, when I open the project, check if the project has all the necessary files in the resources …

0
258
Member Avatar for Gudger

can someone help me with this? "PROGRAM TO DISPLAY FACTORS OF A NUMBER" Use A1,A2,A3..as variable. Sample output Enter apositive integer: 60 Factors of 60 are: 1 2 3 4 5 6 12 15 20 30 60 my teacher say, that we should use stdio.h kg conio.h

Member Avatar for New Jack
0
285
Member Avatar for ladynjb22

I would like to know if any one know what are the steps of setting up code for CPU Scheduling. I must develop a simulation program for CPU scheduling. -First I have to use FCFS(first come first serve) algorithm that will read the first number that me or anybody put …

Member Avatar for Neha_15
0
2K
Member Avatar for Farhan_4

Hello, I have task to read the CSV file using C++ , the CSV file contains 10 rows x 3 colums float data and I want to read it and apply some mathematic and then the ouput should be stored in a new matrix. The thing is If can read …

Member Avatar for mellertson
0
19K
Member Avatar for iPoor

Hi Guys, I wanna know how to change a label's text thats in a different form when the user presses a button in the mainform, I have heard about the Signals and Slots thing but not experienced enough to understand that, Please Help Me!

Member Avatar for iPoor
0
356
Member Avatar for Suzie999

Hi, I am looking into how programs like tcpview manage to know how many bytes are sent and received by an individual process. I notice that the task manager in windows 10 also has this information in the form of Mb/s for individual application. In my initial search I seen …

Member Avatar for Suzie999
0
1K
Member Avatar for you207

Hi! I am writing my own string splitter and i'm stuck. When I'm trying to split the same string the second time im getting only the first word. Im using Visual Studio 2013. "Name|Phone Number|Account Number|Price|Tariff" Output is : Name Phone Number Account Number Price Tariff Name and my desired …

Member Avatar for David W
0
560
Member Avatar for cambalinho

i did a class for tell me what child controls the form have. and another class for tell me the last child control position(more big top and left) inclued the bottom\right. ok. i have the most big X(the last control plus it's width) and: RECT rtcParent; GetClientRect(ActivatedForm,&rtcParent); heres how i'm …

Member Avatar for cambalinho
0
180
Member Avatar for Kashif_3

**I want a C++ program that when build up in TURBO C++ then it will produce an output, which shows file system on my computer being used. I am beginner and dont know how to write this program. please help me. Thanks**

Member Avatar for rproffitt
0
779
Member Avatar for vikingGamer

I'm learning with a book and one of the excercises is to have the computer guess a number of which you think. My problem is that I need to keep altering the range which works for a couple tries then it seemingly forgets the range and goes on its own. …

Member Avatar for Nutster
0
874

The End.