48,986 Topics

Member Avatar for
Member Avatar for DJPlayer

well I'm just stating this one and my brain is about racked w/ the # of assignments going on.. anyways. I have to write a program where a user will input a integer and it will determine the kaprekar #'s of that #, until it reaches the user # input. …

Member Avatar for Cepolation
0
156
Member Avatar for xr0krx

Hello there, I need some help on how I could replace the getch() function. Basically, my assignment was to make a simple simulated "joystick" program. You press the letters a,b,c,d... and it will output the number pressed... The program works and everything, but i found out im not allowed to …

Member Avatar for Narue
0
114
Member Avatar for daesdaemar

I am trying to write a simple slot machine program that will return three numbers as the slot icons using a loop. I can get the first part just fine (I think). But I am stuck at converting my icons to intergers or character that I can compare to see …

Member Avatar for Sky Diploma
0
2K
Member Avatar for policeachan

it is known that dennis rithie made c with only 32 keywords and writing functions is the responsibility of the programmer. who wrote the functions printf, scanf . what is it's sourcr code?

Member Avatar for Narue
0
168
Member Avatar for khushal_kkk

the code that i have coded is of operator overloading for incrementing and the i need some help in the operator overloading for decrementing ,mutiplication and division please send the following in a code form shall be thankful.. [CODE] #include<iostream> class Weight { private: int kg,grms; void ConvertWeight() { if(grms …

Member Avatar for jencas
0
135
Member Avatar for Dinomike1000

Hello, I'm trying to create a window with a C++ win32 app project. I am using creating the HWND object, setting its properties, and then registering the object. Also, there is a WindowProc function. What seems to happen is that the object registers but when I call CreateWindowA(...), this function …

Member Avatar for jencas
0
1K
Member Avatar for AutoC

Hi, I've coded huffman coding.I've formed my codebook.Its correct upto that point.I'm using unsigned int(32 bits) and packing the codes into it and writing to file whenever 32 bits get filled.Somehow..my resultant file is larger than my source file.Am i doing something wrong?

Member Avatar for AutoC
0
273
Member Avatar for princess_19

Sorry 4 bothering you guys... its that im a beginner at this... they gave me a problem but I dont know how to interpret it, it says as follows: [i]The Babylonian algorithm to compute the square root of a number n is as follows. (1) Make a guess, say g, …

Member Avatar for ithelp
0
96
Member Avatar for cy163

Hello ALL, In my program, I first receive data from another machine, then processing the data. Data receiveing is fast, but data processing is relatively time consuming. Hence, I put the code for data processing in a POSIX thread (i am using Red Hat enterpriese linux AS 4). In the …

Member Avatar for cy163
0
137
Member Avatar for Helgso

I'm a beginner to C++, I use CodeBlocks which I think is related to Ming so please make your answers pointing to C++ but not Visual C++. Thanks! And also, please ecplain things in detail ... Well, after a long search on the net I found the code that looks …

Member Avatar for Helgso
0
329
Member Avatar for Zach1188

I am trying to write a program, for practice, similar to the task manager, that lists running process, and their path if possible. I have spent hours all over Google and I can't find anything. Ideally, it would be nice to put the processes and their paths into an array, …

Member Avatar for Duoas
0
99
Member Avatar for want_somehelp

Iam having problem with the following code: All this code does is extract words separated by spaces from string when i compile it i get error27 C:\Dev-Cpp\Untitled1.cpp invalid operands of types `char*' and `char*' to binary `operator*' plzzzz help [code=cplusplus] // Tokenizing program:pointer version #include <iostream> #include <cstdio> using namespace …

Member Avatar for ArkM
0
141
Member Avatar for chiwawa10

Hi all, I have a piece of program written in Visual C++ which works just fine in Win XP. However when its run in Vista, the error message "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." …

Member Avatar for Salem
0
115
Member Avatar for Jennifer84

I think this could be a simple question. I have declared a 2D vector like below. The thing is that by default all elements is set to 0. What I want to do is to declare all of these elements to: -1 how this is possible without doing that with …

Member Avatar for twomers
0
720
Member Avatar for PaladinHammer

This thing is pushing me around. I've been through my book, and I have even downloaded the professor's notes on subject (he posted them). I can't find what I'm doing wrong. Below is the code I've written, below the code is what the console is "supposed" to look like. (Code …

Member Avatar for VernonDozier
0
101
Member Avatar for nizbit

I really don't know where to start and to be honest I really don't know what I'm doing. I was given this project and we never went over these topics in class or the previous class. My attempts to wing it are not going so well and quite frankly its …

Member Avatar for ivailosp
0
180
Member Avatar for guest7

Hi, I am using fgets in my program to count the number of lines in file. The number of columns in each line is entered by the user. But the number of lines are not known. After counting the number of lines in the file i am again using it …

Member Avatar for guest7
0
163
Member Avatar for john88

Hi I have a question. Basically I want to create a dictionary of words, where a user has typed in a couple of sentencies. Im then supposed to sort it in alphabetic order and also count how many times a word has appeard. The sentence contains letters and whitespaces. Ex: …

Member Avatar for john88
0
91
Member Avatar for BattlingMaxo

I havebeen using wxdev c++ but have problems when compiling directx code even though I have installed devpaks for DX9 anyway i think the best thing is for me to get a real compiler not freeware. Are there any good compilers that have gui design tools that will compile directx …

Member Avatar for BattlingMaxo
0
116
Member Avatar for LaurenceB

Hi, Ive made a little program that calculates the area of a circle by doing Pi * r2, but its not working and I don't know why: [code=cplusplus] #include <iostream> using namespace std; #define PI 3.14159265358979323846 #define NEWLINE '\n' int main () { float Radius = 0; cout << "Radius: …

Member Avatar for iamthwee
0
67
Member Avatar for Trekker182

I have to take a 2d array of [6][8] floats that represent a star map and add the four surrounding numbers to it to measure it's intensity of light. Would something like make sense??? [CODE]for(i=0;i<6;i++) { for(j=0;j<8;j++) { stars[i][j+1] + stars[i+1][j] + stars[i-1][j] + stars[i][j-1];}}[/CODE] instead of writing many lines …

Member Avatar for Trekker182
0
174
Member Avatar for LuckyMe444

Hello! I need some help figuring out how to display my array. The program I am working on is one in which the user can enter any given 20 integers and it display them in descending order. I was able to get that part to work but cannot get the …

Member Avatar for LuckyMe444
0
82
Member Avatar for nameless987

Hey... do anyone knows c++ function for implementation of big numbers...i tried googl it...but, i can't find nothing that solve my problem i need to calculate a^e(mod n) example: 125^107 (mod 187)=5 result of 125^107 is too big for standard notation in c++... can someone please help me!

Member Avatar for iamthwee
0
1K
Member Avatar for bhoot_jb

i am writing a program on 2-D transformation which handles transformations for three objects, namely, point, line and a triangle. i have created a base class Object and derived three classes - Point, Line, Triangle - from it. Here i will discuss just the Object and Point class. The code …

Member Avatar for bhoot_jb
0
109
Member Avatar for VBNick

I am trying to paint my own form by using the following code: case WM_PAINT: hDC = BeginPaint(hWnd, &ps); hBrush = CreateSolidBrush(RGB(255,0,0)); FillRect(hDC, &ps.rcPaint, hBrush); EndPaint(hWnd, &ps); break; My problem is, that when you resize the form or drag it around, you can still see it flash grey between paints.... …

Member Avatar for Clockowl
0
84
Member Avatar for kazek

I'm trying to create a function that will delete an already saved file. I was hoping std::remove() would do the trick but I don't know the syntax. Will std::remove() work or should be trying something else...

Member Avatar for mitrmkar
0
87
Member Avatar for BeyondTheEye

Well, the basic structure is a form which uses multiple classes defined in seperate files. Below is my controller class which is supposed to keep track of which files are opened. It's included in both the form and the [i]Map.cpp[/i] file, which contains all Map function implementations. I'm supposing these …

Member Avatar for BeyondTheEye
0
227
Member Avatar for robbie_j0

Hi, I am trying to create an application that gets the contents of two folders. It should compare the file names in the two folders and put files with different names into a list (unique). Each file with the same name in both folders should be read and the contents …

Member Avatar for robbie_j0
0
101
Member Avatar for phillipeharris

I am trying to figure out the merge sorting. I have searched the Dani and found other examples but they did not help me. I wanted to figure it out by myself but I cant. here are my Errors : Error 3 error C2446: '<' : no conversion from 'int' …

Member Avatar for ArkM
0
189
Member Avatar for NinjaLink

I need help with my output. I have pretty much everything done. I'm just getting an output like: "The class average is 5.8%" "The class average is 12.4%" "The class average is 13.6%" "The class average is 18.4%" etc. "Highest grade is 58%" "Highest grade is 66%" "Highest grade is …

Member Avatar for Sky Diploma
0
243

The End.