49,761 Topics
| |
Hi Guys, Have a question regarding the exception filter. I have a MiniDump class which looks like this: class MiniDumpHelper { public: MiniDumpHelper() { ... } LONG WINAPI exitWithDump(struct _EXCEPTION_POINTERS* exceptionInfo) { ... return EXCEPTION_CONTINUE_SEARCH; } } then i have a host.cpp class where i have a `main()` I try … | |
Hi, I'm making a matrix class and I'm currently trying to overload some operators. [B] +=[/B] [code=C++]#ifndef MATRIX_H #define MATRIX_H #include <iostream> #include <ostream> #include <string> #include <sstream> class Matrix { Matrix& operator = (const Matrix &m); Matrix& operator += (const Matrix &m); public: Matrix(int x, int y); Matrix(Matrix &m); … | |
Hi, I was working on my assignment and on compiling everything works perfect except at one place the compiler seems to skip the cin command. Here is my code: the skipped command is highlited in red. This particular part is suppose to delete the every occurence of an integer entered … | |
Hi, I have been trying to wrap my head around this problem for a while now and I just can't figure it out. I've included the code that is involved with the runtime error. Basically, I have a pointer that points to another pointer. Action points to an array of … | |
Can somebody explain whats wrong in the following code ? I am trying to pass a matrix and the called function is a double pointer. [code] #include <iostream> void func(int **); int main(int argc,char *argv[]) { int A[2][2]={1,2,3,4}; func(A); } void func(int **A) { } [/code] Best, Pradeep | |
[CODE]#include <iostream> #include <cstdlib> #include <fstream> #include <string> using namespace std; const int MAX_MONTH = 13; const int MAX_STRING_MONTH = 20; const int MAX_ARRAY_TEMP = 13; const int MAX_STRING_TEMP = 4; void instructions (); // Explains program to user bool man_or_file(bool& manual, char& m_or_f); // Determines if user wants to … | |
I just started learning SDL so I can make games in C++, but for some reason my code fails to compile. The code: [CODE=c++] #include "SDL/SDL.h" #include <string> using std::string; int SCREEN_WIDTH = 640; const int SCREEN_HEIGHT = 480; const int SCREEN_BPP = 32; SDL_Surface *message = NULL; SDL_Surface *background … | |
This is more of a general question to see if I got the concept. I defined a class with private member data: one is an int variable and the other is a pointer. 1. Where is the int variable stored?... on the heap or on the stack? 2. Where is … | |
| Hey guys, I'm working on my homework assignment and I did all the code, but I can't figure out how to display the "hours of labor required" and The number of gallons of paint required. Here is the assignment: A painting company has determined that for every 115 square feet … |
Btw below is the key parts of my code - not all as there are loads of lines: [CODE] //main.cpp #include <iostream> #include "Customer.h" using namespace std; void displayMainMenu(); int enterMainChoice(); void displayAccountMenu(); int enterAccountChoice(); int enterCustomerID(); Customer createCustomer(); void main(void) { unsigned short numberOfCustomers = 0; Customer *Customers[10]; *Customers[numberOfCustomers] … | |
how can i draw a circle divided to many sectors ,each secteor area deppends on specific angle for each sector in the circle , thanx for help , regards | |
I am writing to a text file. Everything is working fine, except I can not figure out how to start a newline. I have tried fprintf(txtFile, "%s", "\n"); fprintf(txtFile, "%s", '\n'); fprintf(txtFile, "%s\n", " "); where txtFile is my FILE handle. How do I create a newline? Thanks. | |
Hi guys! I wrote a class "Complex" which is representing complex numbers. Nevermind, I was trying to make it a library so i could use it easily in other projects but when i compiled i always got this an error. This is the log from the compilation. [QUOTE]Compiler: Default compiler … | |
I program using Win32 API's. I compile with Borland or Microsoft "CL". I am on an XP machine. I use .cpp extensions to compile so C++ rules apply. I'm trying to get the bytes from my screen and send them to a disk file. I get a handle I call … | |
I have some codes like these: [code] process(void*p1,long lNum1,long Type1,void p2,long lNum2,long lType2,Param * toher...) { switch(lType1) case TIA_8U: switch(lType2) case TIA_16U: CMatrix<BYTE>* pIn = (CMatrix<BYTE>*) p1; CMatrix<USHORT>* pOut = (CMatrix<USHORT>*)p2; Run<CMatrix<BYTE>, CMatrix<USHORT>,BYTE,USHORT>(pIn,lNum1,pOut,lNum2,otherparams....) break; ... } [/code] Now I have a problem: the number of data types is at least … | |
| I have 1 line in this code that I can't get to compile. I'm new to C++ and begging for some help...any advise would be appreciated. [code] #include <iostream> #include <iomanip> using namespace std; double population(double pop, double birthRate, double deathRate); void printPopulations( double startPop, double birthRate, double deathRate, int … |
Hey, I am wondering how I can grab all the selected strings from a ListBox with multiple selection on... I tried looking for it on google and everything, and I know about SelCount but I haven't been able to find out how to grab the strings or the indexes of … | |
If I initialize graphics in my program and then use cout the font appears bigger than normal and the cursor doesn't blink on the screen as it does when the graphics are not initialized.Is there any way I can use graphics as well as cout in my program?If yes how … | |
im working on an encryption program and i need some help. so far it words fine except when i enter a space. when this happens it seems to end the loop and spit out the first word. any help would be great [code] #include <iostream> #include <string> using namespace std; … | |
:?: :idea: Anyone can help me or give me code C/C++ of detect sound from speaker ex If have sound from speaker report " currently have sound" If not "currently not sound:zzz: " | |
| I'm a newbie at posting code so I'm sorry if I make any mistakes. The 26 line won't let me compile and I don't understand why. can anyone help me??? [code=cplusplus] #include <iostream> #include <iomanip> using namespace std; double population(double pop, double birthRate, double deathRate); void printPopulations( double startPop, double … |
Write a C++ program that reads in the historical average monthly rainfall for NY for each month of the year and then reads in the actual monthly rainfall for each month in 2007. Finally, the program should print out a nicely formatted table showing the average rainfall for each month, … | |
| I can't get it to compile. Here are the instructions for the assignment: Write a program that determines which of a company’s four divisions (Northeast, Southeast, Northwest, and Southwest) had the greatest sales for a quarter. It should include the following two functions, which are called by main. • double … |
[B][COLOR="Red"]Can someone please help me to understand how to read and write unicode from/to a file? also how to set and print a variable to/with unicode (like a wchar_t variable or whatever.)? Im at an intermeddiate lvl in C++, and when I search this on google I don't understand a … | |
[B][COLOR="Red"]I am at a lvl between beginner and intermeddiate with C++, and I can't figure out how to play a wav sound from a C++ program... I search it on google and all the code I look at doesn't make any sense to me. Can someone plz help me to … | |
I am trying to count the number of each letter grade for a list of students and count how many are male and female and how many students there are total. The problematic section is: [code] int ItemType::CountItems(int& ACount, int& BCount, int& CCount, int& DCount, int& FCount, int& MaleCount, int& … | |
Hi all, I'm a C++ programmer and now about to use Visual C++. May I know the difference in terms of functionalities? will my code written in classic C++ run on Visual C++? thanks. | |
I have a buffer of chars. I want to display them in a text box as hex. is there a simple way to do this? Thanks. | |
Hi guys, being a beginner I have some trouble with pointers. I don't know but something about using pointers is just not getting clear to me. My assignment requires that from an array of given values, the user inputs a particular integer whose every occurrence with in the array should … | |
Hi I have a particular problem in returning an element of a struct which matches a maximum of another element here is part of the code, which will work, but does not display the details[i].title, which part of my original Struct declaration. What am I doing wrong ? [code=cplusplus] int … |
The End.