51,592 Topics

Member Avatar for
Member Avatar for toolmanx

I've tried to clean down this code so that it will demonstrate my problem but contains little else. Just enough to make a window. This code will compile on "BCC32" or "cl". I can't figure out why I get an "Invalid handle error" when trying to create a DIB. I'm …

Member Avatar for Duoas
0
2K
Member Avatar for webster22

Hi, i have to programm this in c++ can anyone please help me and give me the code for this Material Weight (kg / dm3) Price (euro / dm3) Marbel 2,7 20 Stone 2,6 15 Tree 0,6 7 these three item have diffrent price and diffrent weight. Programming based on …

Member Avatar for ithelp
0
102
Member Avatar for Duki

Hey guys, Here's my code: [code=c++]#include <iostream> using namespace std ; template<class T> class Pair { public: Pair ( ) ; Pair (T v1 , T v2 ) ; void setFirst(T newV ) ; void setSecond(T newV ) ; T getFirst() const ; T getSecond() const ; private: T first …

Member Avatar for Duki
0
123
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
84
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
356
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
120
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
95
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
82
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
75
Member Avatar for nedwards

Hi, I have an interesting question. I have this C# Application and I need to generate a report. I want to be able to print the report or save it to a file. Unfortunately I don't want it to depend on a third party software ( Crystal Reports, MS Word, …

Member Avatar for scru
0
113
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
117
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
101
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
250
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
94
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
118
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
85
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
87
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
170
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
94
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
168
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
120
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
82
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
62
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
142
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
88
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
428
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
136
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
555
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
115
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
31
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
103
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
177
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
96
Member Avatar for maysda19

I'm trying to display the output on the console, but when I run it all I get is "Join processing is starting" and that's it. Is there something that I'm doing wrong? [code=c++] / Join customer and transaction files on customer cout << "Join processing is starting. \n\n\n"; transFile >> …

Member Avatar for vmanes
0
95
Member Avatar for Slavrix

hey im tryin to get this program me and my mates are writing to work, but for some reason i ge these errors upon compilation im using MSVC++ Express Edition and ive downloaded PlatformSDK because it doesnt come standard with it. [CODE]1>------ Build started: Project: av_bot, Configuration: Debug Win32 ------ …

Member Avatar for Slavrix
0
186
Member Avatar for Scotty Turbo

Run-Time Check Failure #2 - Stack around the variable 'board' was corrupted is the error I'm getting. The program generates it's own maze and then will solve it. The error seems to happen after the program is done with EVERYTHING. I'm using Microsoft Visual Studio 2008 beta. [code="c++"] #include <iostream> …

Member Avatar for vijayan121
0
203
Member Avatar for cllgegrl

I am writing a simple program that takes a string input from a user, stores it in a dynamically allocated array, changes it to upper case, and then prints. It works for all letters and symbols but when I use a space character, the program automatically exits. Can someone please …

Member Avatar for joshua.tilson
-1
95
Member Avatar for neilyan

ok my teacher wants me to write a program using these instructions : A small airline has just purshased a computer for its new automated reserations system. You have been asked to program the new system. You are to write a program to assign seats on each flight of the …

Member Avatar for neilyan
0
108
Member Avatar for codder

i am using boarland c.and i want to know how to generate random numbers...is there any functions which allow me to do this?

Member Avatar for joshua.tilson
0
108
Member Avatar for phasiro

Hi, noob on board. I have some issues with the spliting data according to tab. What i need is to grab multiple inputs from a txt file and generate it into result txt file. the input file reads like; Johnny Bravo /tab S1234567 Systems /tab/tab DT012 VB /tab/tab DT234 Adv …

Member Avatar for phasiro
0
126
Member Avatar for Koldsoul

I have to write a program for school that has user input ten movie titles and their corresponding ratings. This program must use parrallel arrays. There is more to the program but not needed for the issue I am currently having. I cannot seem to get the string for the …

Member Avatar for Salem
0
104
Member Avatar for jaepi

Hello there, I have here a bit of confusion with fread. I have here a .cue file generated in windows. I tried to read through the entire file in windows and when I printed the buffer, it gives me the correct content of the file, but when I read it …

Member Avatar for ithelp
0
131
Member Avatar for Fabledmetal

Basically me and my friend are making a C++ hangman project in our programming class and we're having troubles trying to find a way (with our limited knowledge) on how to display certain letters if their guess is correct. E.G ____ __ (they input the letter i) displays __i__ _i …

Member Avatar for WaltP
0
93
Member Avatar for Duki

How important are data structures in C++? I'm majoring in networking and going to grad school for MISM with a focus in networking. If I have a firm understanding of C++ concepts such as encapsulation, inheritance, recursion, polymorphism, templates, and exception handling will topics in data structures benefit me at …

Member Avatar for Duoas
0
112
Member Avatar for Duki

Could someone explain the difference between Overloading, Redefining, and Overriding functions? A nutshell answer will work fine; I just need something to stick in my brain for tomorrow's test. I know the concepts behind these tools, but I just need a simple way of defining the difference between them.

Member Avatar for Duki
0
6K
Member Avatar for guitarrick

I am a newbie and have been working on this project for several days. I have received help thus far from Dani and it's been fruitful. The project entails a "memory matching" game with 16 cards, labeled 1-8 in pairs. The cards are "shuffled" and placed face down on a …

Member Avatar for Duoas
0
98
Member Avatar for dblbac

i have been fooiling around with my program for class trying to get it to work, but now i get this error message: error C2064: term does not evaluate to a function taking 1 arguments it is referring to this part of the program: num = (rand() + time(0)) % …

Member Avatar for maxmaxwell
0
126
Member Avatar for WillEthin

A common memory matching game played by young children is to start with a deck of cards that contain identical pairs. For example, given six cards in the deck, two might be labeled “1,” two might be labeled “2,” and two might be labeled “3.” The cards are shuffled and …

Member Avatar for Duoas
0
818
Member Avatar for qfar96
Member Avatar for zandiago
0
30

The End.