49,761 Topics
| |
:] 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 … | |
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 … | |
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 … | |
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 :) … | |
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 … | |
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 … | |
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 … | |
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 | |
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, … | |
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 … | |
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 | |
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; … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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. … | |
[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; … | |
can anyone tell me .....how to make c++ program that gives command as output to the robot that connected to usb port.... | |
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 … | |
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 | |
i need help on funtions throughout, i want to take lecture on funtions . theory then practicle....... so plzz help me | |
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 … | |
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 … | |
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 … | |
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? | |
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 … |
The End.