49,756 Topics
| |
hey guys, I am a beginner and am having trouble loading data from an external data file and then loading it to the screen. It is supposed to be the temperatures from everyday for a year for 2 years. 1 column is 1930 the other 2000 This is my script, … | |
Ok, so I have most of the code working but I've been up for over 24 hours and I just cannot seem to get the test score to come out. Here's my code, hopefully someone with fresh eyes can spot my error, I know it has to be something simple … | |
[CODE]void BinarySearchTree::inorder(tree_node* p) { if(p != NULL) { if(p->left) inorder(p->left); cout<<" "<<p->data<<" "; if(p->right) inorder(p->right); } else return; } [/CODE] This sample of code works fine if I use it to test valuables that are primitive, example: integer I wanted to be able to transform that, so, if for example … | |
My program runs, but I am getting this message which I am fairly sure means that I have a memory leak and it is coming from my destructor. Assignment2(779) malloc: *** error for object 0x100100120: pointer being freed was not allocated I don't know what I am doing wrong. Since … | |
what does error code -25922 means.. it is coming as a value of error in my programs line error = sPSActionControl->Play(&result, eventMake, desc000001B0, plugInDialogSilent); i want to know what this error code stands for.. please help me | |
I'm trying to move functions that I have created in my .h files into the .cpp files of my winForm application. I don't really know how to get this to work. Example code in .h: [CODE]void loadCustomerDetails() { SQLiteConnection^ ObjConnection = gcnew SQLiteConnection("Data Source=SwiftService.db3;"); SQLiteCommand^ ObjCommand = gcnew SQLiteCommand("SELECT * … | |
Hello! This is my first time attempting to get help but, alas, I'm desperate! I have been working on this program for a class (and it's due at midnight). I can't seem to grasp moving data in and out of arrays using nested for loops. it's a matter of entering … | |
Hi, I am writing a simple program modeling client/server interaction. I want the server to be capable of handling multiple connections. To implement this, I have been using _beginthreadex, passing references to sockets to the child thread. For example: [code]while(1) { SOCKET sClient = accept(ListenSocket, NULL, NULL); ... child = … | |
Hi all, I've built a Queue class which basically uses dynamic memory allocation to make an array grow with every new element inserted. It compiles and works perfectly under dev c++, but when I included the class in a VC++ 10 Express project and instantiated an object from it, the … | |
ive been told to put all my sql statement together but i jus keep getting lots of errors with local variables in my vc++ project. sql.h[CODE]#ifndef __SQL_H__ #define __SQL_H__ #include "stdafx.h" #include <iostream> #include <string> using namespace std; using namespace System::Data::SQLite; using namespace System::Data; using namespace System::Windows::Forms; using namespace System; … | |
I am using Visual C++ Express Edition on Windows, and I am look at the windows task manager and I noticed that every second, in the process tab the memory of my C++ program increases about 8 K when I am not even doing anything. Also, I've noticed that if … | |
what does it mean by "error: expected unqualified-id before '=' token|" "|error: `i' was not declared in this scope|" "error: `cout' was not declared in this scope|" "error: `endl' was not declared in this scope|" for this code. int main() { for(int = 1; i < 100; i += 2) … | |
Ok, so I want to create an alternate way of creating this: *________* **______** ***____*** ****__**** ********** ****__**** ***____*** **______** *________* Note: The right side is supposed to lookjust like the left side. Note 2: Replacing the underscores with asterisks(*) This is the code I have so far, but I … | |
I wanted to make a program to help me find the locations of some double valuse in current process memory. I found some code snippets to study, but Im failing at the first hurdle. First let me be clear that I am not the author of the below code, but … | |
Hello, I really could use some help with this hangman program. I have searched all over the internet to find an answer that i can understand. I'm a beginner at C++ programming. This program prompts the user to enter a phrase. then you guess letters. if a letter is wrong … | |
/*My problem is on line with outdata1<<A3[p]<<endl; its says no operator found, help would be much appreciated*/ #include <iostream> #include <fstream> #include <string> using namespace std; struct Data { string salesperson; string style; double price; int quantity; }; int x; int y; int i=0; struct Data A1[100], A2[100], A3[100]; int … | |
Hi I have never used vedctors before so I am just wondering if this is correct or not. If not, would you mind showing me the correct way to use it? [CODE]cout << fixed << setprecision( 2 ); vector < Employee * > employees( 4 ); employees[ 0 ] = … | |
Hello, I am trying to develop a program that will not show untill a boolian is set to [ICODE]false[/ICODE], but I am having trouble making the code work. Here is the code I am using to start the program; [CODE]#include "stdafx.h" #include "Form1.h" using namespace Program; [STAThreadAttribute] int main(array<System::String ^> … | |
Hello, Can some one give me a hand on my search algorithm? I know it's not working right and am not sure how to make it work properly. It is on line #'s 69 to 73. It has to search for the name that is already stored in the array … | |
Hey everyone, I currently am creating a Card shuffling program in C++, Ive taken care of the shuffling of the deck. Now I just need to distribute a hand of 5 cards, and determine hands. Can anyone help? Please! cardheader.h ( includes both Class Card & Deck ) [CODE] #ifndef … | |
I need some code in C Or C++ witch produces a Dialog box with an embedded active X control witch Utilities The GUID & Control name & file name to find the ActiveX control I need it to compile in borland C++ 5 & work with 9X & Nt ATL.dll … | |
Hey all, I'm writing a program that is an address book using an AVL Node structure (which was provided). I defined the [I]contact[/I] class as the ItemType of the data to be inserted in each node. Initially I encountered a Segmentation fault that occured during the assignment from the AVLClass … | |
This one seems really simple but for some reason I'm not getting it! Here's the problem: USING A FOR LOOP, read 4 lines of input from the user and display it on the screen. I made my code, which works, but it only reads the first line the user has … | |
I want to have a template function like this: [code] template <class T> void CreateBlankPatch(typename T::Pointer patch, unsigned int sideLength) { CreateConstantPatch(patch, typename T::PixelType::Zero(), sideLength); } [/code] It works fine as long as Zero() is defined for the class T. However, with POD types, this is clearly not the case. … | |
Hey everybody, So I though that I understood linked lists and arrays well enough to make a hash table with separate chaining. Theoretically, it seems trivial, but I am getting a runtime error. The error appears to arise from the line head = heads[i], where head is a node pointer … | |
Hi, I am loading in a dictionary text file of English words, but I am not supposed to load any words if they contain an apostrophe. I am loading them in as strings, and I cannot figure out how not to load the string if it contains an apostrophe. Here … | |
Hi all, I want to read a file. The file is like that : 20 20 1 5 6 20 21 1 2 3 21 22 2 4 6 20 20 2 3 5 20 21 6 5 2 21 22 1 6 7 .... and I would like every … | |
Hi. This should be very easy for you guys, but I still can't get it visualized in my mind. Here's what I'm trying to do: [CODE] if (flag) for (i = 0; i < 10; i++) {LARGE_BLOCK_OF_CODE (that visits an array in order)} else for (i = 9; i >= … | |
I've got this header and cpp.And I would like to insert this operator overloading to this .h and .cpp file. but I always got errors. Operator OVERLOADING : [CODE]istream& operator>>(istream& in, Focista& jatekos) { cout << "Add meg a focista tulajdonsagait. " << endl; cout << "Nev: " << endl; … | |
can anyone upload a simple modular example in c (They would include .c files and .h files please) i am currently working on modularization but i have a problem when it comes to the main.c and main.h. . . its an assignment. i just want to reference and work on … |
The End.