49,756 Topics

Member Avatar for
Member Avatar for ak47kumar1

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, …

Member Avatar for ravenous
0
111
Member Avatar for stripe

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 …

Member Avatar for stripe
0
150
Member Avatar for Diogo Martinho

[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 …

Member Avatar for Diogo Martinho
0
96
Member Avatar for aaronmk2

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 …

Member Avatar for iopp
0
1K
Member Avatar for malayasthana

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

Member Avatar for ravenous
0
126
Member Avatar for shakssage

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 * …

Member Avatar for jonsca
0
426
Member Avatar for ChristinaS

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 …

Member Avatar for ChristinaS
0
127
Member Avatar for DarthMustard

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 = …

Member Avatar for thelamb
1
743
Member Avatar for deanus

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 …

Member Avatar for deanus
0
140
Member Avatar for shamsu50

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; …

Member Avatar for mike_2000_17
0
125
Member Avatar for DaSpirit

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 …

Member Avatar for mike_2000_17
0
573
Member Avatar for NVR_@!2107

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) …

Member Avatar for group256
0
110
Member Avatar for SabinIvy

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 …

Member Avatar for Clinton Portis
0
220
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
225
Member Avatar for ScreamingPsycho

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 …

Member Avatar for ScreamingPsycho
0
163
Member Avatar for pottart22

/*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 …

Member Avatar for daviddoria
0
219
Member Avatar for anglwthnati2de

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 ] = …

Member Avatar for DarthMustard
0
117
Member Avatar for MilesTailsProwe

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 ^> …

Member Avatar for jonsca
0
171
Member Avatar for jmcorpse

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 …

Member Avatar for Agni
0
334
Member Avatar for z1ggy

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 …

Member Avatar for z1ggy
0
2K
Member Avatar for LampOil

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 …

Member Avatar for LampOil
-2
161
Member Avatar for lasl0w

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 …

Member Avatar for lasl0w
0
975
Member Avatar for acv528k

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 …

Member Avatar for alexchen
0
143
Member Avatar for daviddoria

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. …

Member Avatar for daviddoria
0
165
Member Avatar for ace8957

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 …

Member Avatar for Agni
0
173
Member Avatar for Wolf CCMLG

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 …

Member Avatar for Wolf CCMLG
0
223
Member Avatar for bufospro

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 …

Member Avatar for bufospro
0
122
Member Avatar for SoftwareGuy

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 >= …

Member Avatar for SoftwareGuy
0
196
Member Avatar for abuka

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; …

Member Avatar for abuka
0
234
Member Avatar for Plastix!!

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 …

Member Avatar for ravenous
0
66

The End.