49,761 Topics
| |
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 … | |
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 … | |
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, … | |
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 … | |
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." … | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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: … | |
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 … | |
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 … | |
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! | |
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 … | |
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.... … | |
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... | |
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 … | |
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 … | |
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' … | |
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 … | |
Hi, guys If you open [url]http://support.microsoft.com/kb/310674[/url] link, you will see there are several ways that make using references in a Managed C++ application. I tried all of them, but i still cannot see the object of the dll reference project. My project is a mixed mode project which contains normal … | |
Ok. I'm not experienced at all, and I need to program a set of different math formulas into a code. Here is the first step I'm trying to take. I have an octahedron that has 8 plates. Each plate is composed of 3 vectors. There are 6 vectors in total … | |
****I'm stuck as to what my next step should be?? I also want to know if I'm on the right track. I've tried searching for some type of sample program as I am sure there are plenty, but when I start to write it doesn't seem to make sense. Any … | |
I am writing a program to handle a DVD collection. There are 2 classes. The first class is a string class that has member functions that handle strings(length, compare, etc.) and store strings(dynamic array). The second class handles the actual DVD's-title, year, actors, and brief description. I'm confused on working … | |
hello dear guider i design a simple application in C++ 6 using mfc. but when i try to test it on other pc it doesn't run i dont know why because am a dummy. an sorry i might have flame dont blame me am just beginner. | |
could someone atleast point me in the right direction? i'm new at this and i've been working on this program and I just hit a brick wall. Its like my brain stopped working or something... :confused: I have to make a "stop watch" program...have a class defined for stop_watch that … | |
Hello. Any way of preventing multiple instances of executables? I'm writing a program that uses a file, it would be quite messy if someone would start another instance of same program. If it depends on OS, I would like to see solutions for windows and unix-type (linux) systems. Thanx | |
Hi, My doubt is that..lets say we have an usigned int.If I do a left shift by 32 bits...I'm getting back the original one..shouldnt it be all zeros?? |
The End.