49,761 Topics

Member Avatar for
Member Avatar for stevechow

:] Awesome title. I have a program called Life. This program creates an array from the numbers in a .txt file, then it puts it into an array. The cells in the array will have "bacteria" if they are named in the .txt file. The bacteria will be removed if …

Member Avatar for jonsca
0
137
Member Avatar for kevinkace

Can't figure out what's wrong with my delete function. If I remove the delete for the name and address it works as expected, but am I not leaking memory that way? [B]Structs:[/B] [CODE] struct Person { char* name; char* address; int zipcode; }; struct Node { Person* per; // Person …

Member Avatar for kevinkace
0
173
Member Avatar for alokjadhav

I am using SWIG to extend Python to C++. Understand that there is a different forum for SWIG users but I am still waiting for a response on that list. But the questions I have consists of basic Python C API releated. I hope this list will be able to …

Member Avatar for alokjadhav
0
704
Member Avatar for jonathanYoung

allrighty, this MAY take a bit to answer, but i have here a standard visual c++ function that clears the screen, i found off the internet. what i need, is some help knowing what all the different functions inside do.... since codes useless unless you know what it does :) …

Member Avatar for Clinton Portis
1
418
Member Avatar for Jeffro_i4i

I am to create a project that evaluates math expressions and their derivatives. I have a Formula class with only virtual functions: virtual void print() virtual void print(int) virtual Formula *derivative() virtual int evaluate() Then I have 7 other classes which inherent from Formula, they are: Variable Constant Add Multiply …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Jfunch

I need to write a program that converts a date entered by the user in numeral format such as 1/25 or 10/3 to the corresponding alphabetical format such as January 25. This program requires that i use Exception-Handling in case the user enters and invalid month or day such as …

Member Avatar for Ancient Dragon
0
99
Member Avatar for OliverW

I'm adding about 25,000 objects to a vector and it's taking too long so I wanted to try and speed it up. Currently I'm adding them in the format: [CODE]vector<MyClass> MyVector; MyVector.push_back(MyClass(Param1, Param2, Parm3, Param4));[/CODE] As I understand this would involve creating two instances of the object and copying one …

Member Avatar for Clinton Portis
2
130
Member Avatar for bairamfci

i have array on 3*3 2D and every row are sorted and every colomn are sorted also and need to apply binary search on it as best algorithm e.g : 9 11 17 12 15 22 19 20 29

Member Avatar for Ancient Dragon
0
80
Member Avatar for Seriss

I am probably doing something either terribly wrong or it's just something that requires a simple fix. I know I need to find at least 4 employees that don't match the employees in the class one array. But I get absolutely no output. [CODE]int ClassOne::binSearch(int employee) { int first, last, …

Member Avatar for Seriss
0
87
Member Avatar for amsmith90

I had to create a program that has to work with an array of MAX temperatures, define a constant for the array size, use sort and search algoritms, and write a menu driven program for homework. I am stuck on what's next after the int declaration as such; #include<stdio.h> #defineMaX6 …

Member Avatar for Nick Evan
0
72
Member Avatar for alnea

hi!!i need help.Write a program, building a function that finds the surface, diameter and perimeter of a circle.I need it for tomorrow

Member Avatar for Fbody
-4
86
Member Avatar for Gem74

help! I am getting an error message, no appropriate default constructor available. I am not sure what I need the default constructor for? how do I correct this? [CODE]#include <iostream> #include <string> using namespace std; struct Node { /** member variables */ int key ; string value ; int x; …

Member Avatar for Gem74
0
2K
Member Avatar for BruenorBH

I am trying to change the NIC speed through the registry.. But my problem is that I dont fully understand the command RegSetValueEx. I have checked the Internet up and down for some good examples but have fallen short.. I am tring to set the default value for the NIOC …

Member Avatar for BruenorBH
0
416
Member Avatar for floyd54

Heres the code I have so far. [CODE]#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main() { int row, column, done, i, c; string row_num; cout << "Please enter the numbers of rows and columns "; cin >> row; cin >> column; cout << "Please enter the numbers …

Member Avatar for Murtan
0
90
Member Avatar for jessicamelillo

I have a project due for my computer programming class on Monday, and though I've completed the majority of the program, I now have to loop it and have no idea how. Here is the program: #include<iostream.h> int add (); int subtract (); int multiply (); int division (); void …

Member Avatar for Murtan
0
88
Member Avatar for merse

Let us have a complex class with two double data member. If I would like to copy it by reference that means that I have two copy one or two pointers?

Member Avatar for merse
0
64
Member Avatar for Seriss

I have to write a program which uses 2 classes to load 2 dat files into arrays. I then have to somehow compare the IDs in array1 to the IDs in array2 to get the extra IDs out of array1. These extra IDs then have to be stored somewhere so …

Member Avatar for Seriss
0
84
Member Avatar for Mclovin1234

Hey, what i am trying to do is to write a function that inputs a student's average and returns 4 if a students average is 90-100, 3 if the average is 80-89, 2 if the average is 70-79, 1 if the average is 60-69, and 0 if the average is …

Member Avatar for Grn Xtrm
0
359
Member Avatar for mr.hassan4489

The Question is : A store has 6 items. Each item has a price and a bar-code that uniquely identifies it. To simulate such a store, the program offers a menu showing the codes, their corresponding items, and their prices. The user chooses one or several items to buy, and …

Member Avatar for zobadof
0
148
Member Avatar for DCV

Hey, I'm in a class in which the assignment here is to sort integers. We were called on to use two different sorting methods: InsertSort and HeapSort. My InsertSort works just fine. My HeapSort, however, does not; when the HeapSort() function is finished, the integers are still out of order. …

Member Avatar for Narue
0
131
Member Avatar for hao90

[CODE]#include <iostream> #include <cstring> using namespace std; int numberOfDeposit, numberOfWithdrawal; double monthlyInterestRate, monthlyInterest; float totalAmount; double MonthlyServiceCharge; int selections, choices, functions; string name, address, loginID; int idNum, password; class bankAccount { public: bankAccount() { float balance; double annualInterestRate; } float thismonthDeposit; float thismonthwithdrawal; float balance; float getbalance() { return balance; …

Member Avatar for zobadof
0
183
Member Avatar for n0mi

can anyone tell me .....how to make c++ program that gives command as output to the robot that connected to usb port....

Member Avatar for CodyOebel
-3
90
Member Avatar for wittykitty

I have viewed a lot of threads out there relating to what I am looking for and can't seem to find one that will help. I am reading data in from a file. Even though I already know how many names are stored in the file, I need to write …

Member Avatar for jonsca
0
219
Member Avatar for foxmulder

Hi! I have 5 different functions which all must be connected to main, for example a menu that calls each function. How do I do this? Thanks in advance! Best regards Adam

Member Avatar for kevinkace
0
111
Member Avatar for IT seeker

i need help on funtions throughout, i want to take lecture on funtions . theory then practicle....... so plzz help me

Member Avatar for mrnutty
-1
62
Member Avatar for ellimist14

I realize no one is going to want to read through this source code but if anyone does and is able to tell me why I'm getting the errors I'm getting I would be extremely grateful and would pay them back somehow. My code is as follows (I just put …

Member Avatar for shaneselling
0
136
Member Avatar for CodyOebel

I got this to compile, but it's not popping my Dialog box. The tutorial from [url]www.winprog.org/tutorial[/url] didnt necessarily specify where my AboutDlgProc() is suppose to go ? I assumed it went above the Default but I am unsure... I'm trying to understand why it's not popping my Aboout Dialog when …

Member Avatar for CodyOebel
0
146
Member Avatar for lotrsimp12345

gives me error on 3rd coded line in search(). [CODE] #ifndef MY_HT_CHAIN_H #define MY_HT_CHAIN_H #include <iostream> #include <vector> #include <list> using namespace std; class my_ht_chain { public: //constructor which creates a table of a certain size my_ht_chain(int initTableSize); //destructor ~my_ht_chain(); //insert a value based on key void insert(int key); //search …

Member Avatar for lotrsimp12345
0
98
Member Avatar for blerina12

Hello guys. I want to compare two files using a system call to DOS command fc. The problem is that fc does not open the file entered as a command line argument. [code] code = system("fc args[1] ..\\o.txt"); [/code] Does anybody know how to make it work?

Member Avatar for blerina12
0
150
Member Avatar for JeyC

I Have a code that fails abruptly after going through several hundred times around a for loop. (The loop is not over yet . I can see that from my printed output) Pinpointing the exact location (line number) and variables at that point of failure can provide me with useful …

Member Avatar for jonsca
0
98

The End.