49,761 Topics
| |
I'm currently writing a small game engine and I've downloaded the Irrlicht source code to take some tricks in the design but I have a question... why use some prefixes in the file names and what they stands for? example: CGUIEditBox.cpp CGUIFont.h CXMLWriter.h IDepthBuffer.h I also saw this practice in … | |
I am writing a code in c++ unix environment using gmp for impelementing quadratic sieve I have many global variables i.e the number to be factorised and some arrays, sievelength,factorbase siz etc. During the first part of the program, the program simply calculates the factor base implemented through a fucntion … | |
So, I'm really frustrated with this problem. I desperately need some good explanation about this. Why does the calling function does not reflect the change done in the called function? despite the fact that I pass the variable via pointer. Any explanations please. Thanks in advance. [CODE]#include <iostream> using namespace … | |
Good morning, Can you guys please figure this out? I have to write a code that calculates de wage of employees on a self generated list. User is asked for : numberofEmployees, hoursworked, rateperhour. If the employee works 40 hrs: rate= rate * hrs between 40 and 50 rate is … | |
i had construct a maze which i could setup the n x n with user input successfully.The problem is i cannot correctly specify the visited area with 'R',which is a symbol of a robot. [CODE] #include <iostream> #include <conio.h> #include <iomanip> #include <vector> using namespace std; void movement(vector<vector<char> >,int,int); int … | |
Hello guys I have a problem with my code: I want to print an error message every time the user enters a number lower than -273.15 . My code runs well and does the desired mathematical operation. It even loops back to the input message, but I'm having huge headaches … | |
Hi All, I need to create one application which can be install on windows platform. After installation it should add custom menu item in windows right click menu. When we click on this custom menu it should do certain things as per my requirement but it is secondary thing. I … | |
Hello, I am doing embedded system programming. i want to read data from device through the COM1 port. I have already a software that for access the device through the COM1 port and generate data for the device. I wrote a program in c++ that could open the port and … | |
Hello! I have made a program that prints a diamond shape. But my program should read an odd number in the range 1 to 19 to specify the number of rows in the diamond, then it should display a diamond of the appropriate side in which it is at present. … | |
| Dear Pythoneers, I have been reading really good answers on this forum so I thought I'll give it a try and see whether someone can help me. What I want to do: "I want to embed Python in C++ and use Python's capabilities in order to create a expression evaluator" … |
[code=cplusplus]#include <iostream> using std::cout; using std::cin; using std::endl; using std::ios; #include <iomanip> using std::setiosflags; using std::setprecision; using std::setw; int main() { const int PEOPLE = 5, <strong class="highlight">PRODUCTS</strong> = 6; double sales[ PEOPLE ][ <strong class="highlight">PRODUCTS</strong> ] = { 0.0 }, value, totalSales, productSales[ <strong class="highlight">PRODUCTS</strong> ] = { 0.0 … | |
I have this piece of code [CODE=C++]// some function int px; void SomeFunction( void *dummy ) { ... RECT rect; GetWindowRect(hWnd, &rect); px = ((rect.right - rect.left) / 2) - 60; ... // Terminate thread _endthread(); }[/CODE] And my problem is px doesn't get assigned.. it stays 0.. although in … | |
Pl;ease Any Body Help Me Out to send a Lnk so i can check code written in c,c++ about hamming algorithm.. please | |
Hi, I am trying to count the number of iterations that the heap sort goes through but for some reason when my program hits an error and aborts at the end. I don't know if I have my count in the wrong place in the for loop either. I would … | |
Hi, I am new to C++. I am using Visual studio 2008, MFC application. I need to do a GUI program using C++. I have come out with the GUI and now i need source code to communicate to external deivce like hard disk using serial port communication. My GUI … | |
Hey, i need your help :(. Im working on a mail-downloader but it wont work (pop3) :(. mail provider:[url]www.gmx.net[/url] It always say "Wrong ID+PW" why? here is the code: [CODE=C++] #include "stdafx.h" // includes are there ;) //Prototypen int startWinsock(void); int main() { char buf[256]; long rc; SOCKET s; SOCKADDR_IN … | |
I'm adding really big numbers (a lot of them). I'm supposed to detect overflow errors. I did it years ago in Assembly by checking bits, but I've never done it in C++. [code] long long a = pow (2, 62.0); long long b = pow (2, 62.0); a += b; … | |
I am using the lexer software independently without using the yacc parser. what I want is to use this '>' character how should I tell the lexer to do this ? [code] '\<' { InsertOperator ( ANGLE_OPEN) ; } '\>' { InsertOperator ( ANGLE_CLOSE); } [/code] I have already tried … | |
Cashier 1.0 is a C++ program that displays on the screen item codes with corresponding item description and price (at least 10 items). It asks the user to enter the code of the item purchased by a customer. Then, its description and price are displayed on the screen too. Also, … | |
Hi, im trying to write some information into a mp3 file. The information i'm trying to introduce into the file must begin 128 bytes from the end of the file, and this block of information is identified by the string "TAG" at that position (128 bytes from the end). After … | |
Hello, I was hinted for my cause in using a mastertemplate. I did and I swear my little programm was up and running late night just the way I wanted it. This morning, however, I did some other corner stuff and now it does not compile anymore.. just like that... … | |
Code compiles and runs correctly, just need to have the 'total' keep adding to itself after the do you want to continue question. Right now it clears it everytime after it asks that question (Hopefully that makes sense) [CODE]#include <iostream> using namespace std; int main() { double length =0; char … | |
Hi, I am using Cimage library to do a Sobel algorithm. Here is the code [code=cplusplus] CImage * image1; image1->Load(".\\tempSnapShot1.bmp"); CImage* returnImage = new CImage(); Sobel(image1,returnImage);[/code] The Sobel function is [code=cplusplus]void CI90ControllerDlg::Sobel(CImage* image,CImage *returnImage) { returnImage->Create(image->GetWidth(),image->GetHeight(), image->GetBPP(),0); double GX[3][3],GY[3][3]; int sumX = 0; int sumY = 0; int SUM = … | |
How to compute surface area of an object? Write a program that computes the surface area of an object. The user will choose a circle, rectangle or triangle. The program will prompt the user for the values needed (radius, 2 sides or base & height), then show the answer. Requirements: … | |
Hi, I am new to OOP and I have ended up in a situation that might force me to abondon some of the flexibility I had in mind in my project. Before I do so, I figure I'd ask here to see if there is an easier fix for me. … | |
I am confused on how to implement the copy constructor, operators and a destructor given different contexts I have a vector(int size_=0, double = 0); constructor from a given vector class and I have to implement the copy constructor: vector(const Vector&) The copy constructor needs to make a deep copy … | |
Hello I have a program I am trying to make which takes in a word pattern (eg; d?ll, h?l?o, go?dby? etc) & searches an 'array containing different words' to find any words in the array that match the input word pattern. So for example; if I input 'd?ll', the program … | |
Hi, I was wondering how you could change the head bar of a window in windows API. This is the line of code that I want it to change: CAPTION "Spanish Conjugation Quiz" | |
I've been trying to compile several C++ tutorial files that include the standard Microsoft header files, such as 'windows.h' to create a basic window. I'm fairly new to this C++ business, but I have a bit of experience with writing console applications on C. The problem is that the command … |
The End.