49,761 Topics
| |
I got a list of items to program in Visual C++. I could write a linked list from scratch but I want to do something special and best. I am thinking about a hash table. What is best, linked lists or hash tables? I am not too experienced with the … | |
i have a question is there any way that i can add up all the value in a multiplication table i create or parscal triangle i created? if yes i need to find out how to add up all values in a multiplication table. i can't figure out the logic … | |
[CODE] #include <iostream> #include <string> #include <cstdlib> using namespace std; int create_matrix(int* matrix[], int row, int column, int size); int create_pascals(int a, int b); int main() { //variable declaration int size; int* row = &size; int* column = &size; //output to the screen cout << " Please enter the size … | |
Hi there, I'm trying to write a program to accept some details about mp3 files, and store them in an array. I am also hoping to process some of the parameters of each entry to the array. I am trying to create an object of type "Track", and then define … | |
Hello there, first time poster, many time lurker. I'm currently working on an assignment for my CS class which has me creating a small program in which i create an array, call several functions to read intergers into the array, display the array, bur the part which is tripping me … | |
Hi Guys&Gals, Just wondering, when using separate compilation, should the class definition and method definition(s) for a derived class be put in separate header and source files from the base class? Thanks, Ger. | |
I have a file first line contains three int's. (These are the vari's I assigned) numStudents numScores total --I AM CONFUSED HERE- { in >> numStudents >> numScores >> total; } - Here I am mentally not getting it. I need to read the line in the file as a … | |
Hi everyone, this is my first post and im just plain confused on how to get what i need here. in the past ive only had single lines of data and just used an input >> char; but now i have this line of code in a txt file, with … | |
Hello everyone. Thank you again for all the help... At this point, my eyes are bleeding on this project.....My code runs and does everything this card memory matching game is supposed to do, except I've tried to no avail to "shuffle" the cards between iterations (i suspect). I have read … | |
I am working on a problem where I am trying to find a palindrome using a stack and queue. Below is the code that I am using to try and determine if a string is a palindrome or not. Right now I am having problems. It seems as though this … | |
| I am trying to use a for loop to print the contents of a single dimensional array. I am trying to use the loop counter in the 'cout' statement to provide a heading for the contents of each array element. code is below. I am using MS Visual Studio to … |
i want 2 know the logic of adding 2 matrixes in c++.... pls tell me if any extra header files 2 be used? | |
I need to do a stack of strings but im getting problems can anyone help heres what I have so far: [code=cpp] #include <iostream> #include <string> using namespace std; class StringStack { private: string *stackArray; int stackVal; int top; public: StringStack(string); ~StringStack(); void push(string); void pop(string &); bool isFull(); bool … | |
[B] How to show the corresponding nodes of a treeView in a listView? Is it simply by comparing the node->Text and the items->Text? And how to delete the corresponding item? Or the way is complicated to find out that these 2 items are corresponding? Anyway, what's the different between items … | |
Hi, I need some help with average calculation. I have a homework where i must find average value, but this one is quite tricky, atleast for me. usualy it goes like that 1+2 average is 1,5. I have to do it like this: If i input 15 then program should … | |
I'm having trouble with where to begin with an assignment. I'm hoping someone here will have a little more knowledge and be able to explain it to me. Just a point in the right direction please!! Here's the assignment: [B] Create a Class that reads a file completely into a … | |
I am receiving three c2228 errors when I try to compile my program. *edit* I am dealing with rectangular prisms in this program.*edit* Here is my code: [code] #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; class Rect { private: double length; double width; double hight; public: Rect(double l … | |
I have gotten a problem compiling. the program gives me an LNK2001 error so there seems to be a problem with my function but i cant seem to find it..i am posting part of the function that calls and the original function being called void disp() time_info start, end; time_increment(hours_count,minute_count,day_count,month_count,year_count,start,end); … | |
how do i convert an octal number to binary? thanks | |
is there a way to convert a binary number to hex. im sure there may be a library that already does it for you ? | |
Whats up guys. I am new to programming and just started a week ago. I am doing this just for fun. I have a problem with a text file that i am trying to read in. I am able to read in the text file, i just need to know … | |
i don't know how to fix this error can any one help me here's my code: [code=c++] StringStack::StringStack(string value) { stackArray = new string[value]; stackVal = value; top = -1; } [/code] and the erro says: error C2440: 'initializing;: cannot convert from 'std::string; to size_t' what does this mean and … | |
[b]WHERE DO I START!?[/b] [CODE] Write a mygrep program that accepts arguments: mygrep [-i] [-n] match file1 [file2] [file3] ... [filen] A grep program will look for occurences of the "match" string in the files file1, file2, ... filen. Whenever the "match" string is found, the line where it is … | |
I'm working on a school assignment right now, ( populate an array of 50 elements with random integers ranging from 50-100, find mean, mode, standard deviation and the number of elements that fall within the standard deviation) I've written working code for everything except for the function that finds the … | |
Hi all, Suppose i have one string as "A:B:C", where ":" is the delimiter . now i want to seperate this A, B, and C and save them in 3 different variables. How can i implement this thru C++ code. Plz let me know. Thanks in advance. | |
I have an issue with a section of code that will not work correctly. The first instance work fine but everything after is junk data. [code=c++] int arrivaltime = 0; int servicetime = 0; int waittime = 0; // This section shows the bank wait time for the different branch … | |
I need to develop an application in VC++ which makes use of SNMP to communicate with other hardware using serial port. I am new to SNMP, so can anybody please send me some simple code snippets to encode SNMP messages, send/receive such messages etc. Thanks in advance. | |
Does anyone know how to use a timer with the <windows.h> library. I want to display some values to the screen temporarily -- Thank you | |
I've got this code I need to link together by creating the implementation (.cpp) file for. I've been given main.cpp and a header file. I need help on my Zoo.cpp file, specifically now on the "addAnimaltoZoo" function. Here's what I've got so far... main.cpp: [CODE] #include <iostream> using namespace std; … | |
i created a program that read from a txt file and use getline() to retrive every line from my file. But i wanted to store the digit into list<int>, when i do a print of stl list i get the result which not i wanted. i wanted to have "2 … |
The End.