49,761 Topics

Member Avatar for
Member Avatar for complete

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 …

Member Avatar for vijayan121
0
79
Member Avatar for sherwood12

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 …

Member Avatar for sherwood12
0
329
Member Avatar for sherwood12

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

Member Avatar for sherwood12
0
118
Member Avatar for g_loughnan

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 …

Member Avatar for g_loughnan
0
92
Member Avatar for leetcheese

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 …

Member Avatar for vijayan121
0
79
Member Avatar for g_loughnan

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.

Member Avatar for g_loughnan
0
73
Member Avatar for brian@oit

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 …

Member Avatar for brian@oit
0
113
Member Avatar for Trucks

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 …

Member Avatar for Lerner
0
98
Member Avatar for guitarrick

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 …

Member Avatar for guitarrick
0
243
Member Avatar for still_learning

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 …

Member Avatar for Lerner
0
90
Member Avatar for astockton

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 …

Member Avatar for astockton
0
113
Member Avatar for privin

i want 2 know the logic of adding 2 matrixes in c++.... pls tell me if any extra header files 2 be used?

Member Avatar for lineman60
0
83
Member Avatar for superrg86

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 …

Member Avatar for vmanes
0
85
Member Avatar for chrisliando

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

Member Avatar for Lerner
0
166
Member Avatar for wonderland

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 …

Member Avatar for zandiago
0
92
Member Avatar for balla4eva33

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 …

Member Avatar for balla4eva33
0
163
Member Avatar for captinmak

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 …

Member Avatar for Duoas
0
118
Member Avatar for joshmo

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

Member Avatar for joshmo
0
79
Member Avatar for swuwarrior
Member Avatar for swuwarrior

is there a way to convert a binary number to hex. im sure there may be a library that already does it for you ?

Member Avatar for WaltP
0
59
Member Avatar for swuwarrior

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 …

Member Avatar for WaltP
0
137
Member Avatar for superrg86

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 …

Member Avatar for WaltP
0
84
Member Avatar for balla4eva33

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

Member Avatar for vijayan121
0
424
Member Avatar for maxmaxwell

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 …

Member Avatar for maxmaxwell
0
133
Member Avatar for RohitSahni

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.

Member Avatar for RohitSahni
0
553
Member Avatar for Ccrobinson001

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 …

Member Avatar for zandiago
0
106
Member Avatar for pv_srt

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.

Member Avatar for Ancient Dragon
0
30
Member Avatar for guitarrick

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

Member Avatar for Ancient Dragon
0
101
Member Avatar for balla4eva33

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

Member Avatar for balla4eva33
0
172
Member Avatar for picass0

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 …

Member Avatar for picass0
0
93

The End.