49,761 Topics
| |
I have written some code to dynamically allocate memory for a 2D matrix. I am using overload operator to perform functions on the matrix naturally. I am having memory issues (Unhandled exception at 0x... Access violation reading ...). Here is my class, header, and main code. The code builds fine … | |
Hi, I wish to read the file twice. I am using ifstream to read the file. I tried using rewind(File pointer). But i get an error. How can i do it. Thanks | |
Hi, I've wondered this for some time now. Say function A() returns a char* which points to a string.. obviously Say function B(char* szString) takes a char* as its argument. If I call B(A()).. is the string automatically deleted or will it create a memory leak? Thanks | |
A friend convinced me to store a vector of pointers in my class: [code] vector<Point*> Points; [/code] In my class instead of a vector of "real" objects (what do you call this?). The problem now is that there are several functions (out of my control ie. in a library) that … | |
I have a title that is read in from the keyboard. I need to put it in quotation marks but i dont know how to do that...for instance, my program asks the user to put in a movie title and they input the title. Then i have to display the … | |
this is my struct [CODE] struct CropType { string crop; string farmer; string color; string order; }; CropType myCrop; [/CODE] and this is my tree [CODE] struct TreeNode { CropType info; TreeNode* left; TreeNode* right; }; [/CODE] how do i compare a string within my struct like crop to a … | |
Hi, I'm trying to get [URL="http://www.cgal.org/"]CGAL [/URL]working with VS 2005. So, I installed the [URL="http://www.boost.org/"]Boost [/URL]libraries as well as CGAL and tried to run the following example program: [ICODE]// file: examples/Polygon/Example.C //-----------------------------------------------------------------------// // This is just a simple example that demonstrates how to use the // class CGAL::Polygon_2. //-----------------------------------------------------------------------// #include … | |
i have to use an array for this and when i run my program my computer starts to spit out number can someone help me. the critia is that it can read from base 2-9 and will give me the answer in base 10. [code] #include <iostream> using namespace std; … | |
I am recently writing a doubly link list by C++ However,I don't know how to perform shuffle as the following: Places all the nodes in odds positions before that in even ones. For example,after executing shuffle, the list {a, b, c, d, e} will become {a, c, e, b, d} … | |
I need some help with a project. I'm trying to print out all possible combinations of a number grid. For example: 1 3 2 5 4 2 4 3 1 5 5 3 4 2 3 4 3 1 5 2 5 3 4 1 2 The numbers are randomly … | |
I am trying to right align my numbers to make them look like this: [TEX] Total Collected: $ 26572.89 Sales: $ 25068.76 County Sales Tax: $ 501.38 State Sales Tax: $ 1002.75 [/TEX] The problem is i dont know how to format it in my code. Here is my code … | |
Hi! This is my first post here :) and I'm not good with english :) I hope that you will understand :) I'm trying to enter a string with only numbers. I solved this but i dont know how to enable delete (backspace button) ? I solve and this problem … | |
My task is to write a command line program, which has to try and delete a file which is in use. The reason for this is because I am writing a tool which is used for removing malware, and it is very time consuming to have to load up a … | |
I tried to search for other threads to answer my question but couldnt come up with anything that I could think of to describe what I was looking for well. My assignment is this: Write an application that shows the sum of 1 to n for every n from 1 … | |
I have a function that I call recursively, but I want to keep track of a maximum through the entire process. This is what I am doing: [code] void Intersect(double &MaxDistance) { if(something) MaxDistance = something; Intersect(MaxDistance); } [/code] Is that correct/reasonable? Something doesn't seem to be working and I'm … | |
Game description here:[url]http://www.google.com/url?sa=t&source=web&ct=res&cd=11&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBreakthru_(board_game)&ei=dXeTSZH9KJmatwe2i_DiCw&usg=AFQjCNGMFXvDxyuxmi8PrdyGneGpX5SNRA&sig2=pdq6w2j03qSNW-9gQio83g[/url] Variables/functions needed to be known: m_count: turns taken (0,1,2) x,y starting coordinates of a piece h,v destination of said piece get() returns integer 0,1,2 [empty,gold,silver] sideSwitch() resets m_count to 1 and turn to the opposite player. ___ [B]Problem:[/B] First pieces started disappearing: fixed game wasn't ending when … | |
Hi people. I have this code and I am stuck on trying to get a 'call by reference' to work properly. I need to convert Celsius to Fahrenheit and Fahrenheit to Celsius. I am not sure what is wrong with my code. Remember that I have to use a function … | |
Hey I want a code for a please wait with dots in front of it (writes some and delete them and starts again) or a / or \ that rounds. thanks | |
Hi, I tried creating multiple bitmaps on top of each other but cant seem to get the result i want: currently i have one bitmap that is the background and another bitmap that is supposed to be an animal and will be on top of the background. this is my … | |
I have to write a code in Native C++ using which i have to load the contents of an XML into GUI and write back the changes done (pertaining to parameters) into another xml which is a replica of the loaded XML. The usage of TinyXml is a must. Please … | |
Hi, I am a beginner of C#. Currently, I am doing a project of capturing image from a 1394 camera and I used the CMU 1394 camera API to get image from it. As the API is written in C++, is it possible to use in C# by using the … | |
Hi, I am designing a class having interlinked object...a sort of tree. The code for each element of tree looks like : [code] Class C; class Element { public: int key; string payload; C * next; }; [/code] But the object of Element is becoming too heavy because of use … | |
Am a final year student of an institution, i need a computer science based project topic and someone to put me through too. Please help me, is urgent !!!! | |
Hello! i got this code. However i'm really not familiar with memcpy function. Can anybody can show me the other way to write that code without using memory function? [code=cplusplus] void rightRotate (int k, int n) { char temp [2*MAX], *saveptr; saveptr = num+k; // cout << "k" << k … | |
Hi, I am using Windows Vista as operating system and Microsoft Visual C++ 2008 Express Edition as an compiler. I need a matrix library.Could you suggest me any library that I will easily configurate and link with my compiler. For example I need to take square root of a matrix.Because … | |
Peace be on all the readers, i want to read a dbx file from Outlook Express in C++ or even in C#. But i dont know how to do this. Can anyone help me please !!!!!!! | |
asked to do something that is I suppose a little strange. maybe because it's out of the blue and never tried it before. Essentially take a .txt file and split it up into 4 files. (no criteria on size, readability etc.. etc. ) Just split it up.. give each a … | |
(I have installed both MSDN and VC++ 2008 Edition How do I access MSDN? Thanks all | |
Hello all! I am getting my feet wet at working with ftp. I am working with the WinINet library. This is what i have so far: [CODE=syntax] #include "windows.h" #include <iostream> #include "wininet.h" using namespace std; int main() { const char* apphndl = "ftper"; char* wrkingdr; DWORD buffer[100]; HINTERNET handle,handle2,handle3; … | |
Ok, what i'm wanting to do is read a variables from another process ( not modify it ....just read it and output it) so e.g. test.exe: int main(){ int test = 1; return 0; } how would i write a program to read from the process (test.exe) and check what … |
The End.