49,755 Topics

Member Avatar for
Member Avatar for power_computer

Im looking to learn more and powerful functions like winsock to use in my dev C++ programs, Im more into the field of making application like that I really would want to learn all the necessary functions in winsock to make a simple ping program, I googled and search this …

Member Avatar for Ancient Dragon
0
177
Member Avatar for neoseeker191

When I run this program using the F or R choice the first output repeats twice, and I can't figure out why. The rest of the program works great. Prog8.cpp [CODE] #include "stdafx.h" #include "ModifyT.h" #include <iostream> #include <string> using namespace std; int main() { char ch; char exitLetter; char …

Member Avatar for SeeTheLite
0
147
Member Avatar for pt_solar

This is the question asked, your help is very much appreciated : One of your professors has asked you to write a program to grade her final exams which consist only of 20 multiple-choice questions. Each question has one of four possible answers:A,B,C or D. The file CorrectAnswers.txt , which …

Member Avatar for SeeTheLite
0
193
Member Avatar for pt_solar

hi I have a problem finding the lowest and highest selling product in this question. Can you please help me ? this is what I have . It also wants me to display the name of the salsa not how many jars were sold how do I include that in …

Member Avatar for pt_solar
0
772
Member Avatar for SndSystm

Hello! I'm new here and I'm trying to make a craps game as a project. When i get to a certain function where the player rolls and makes a point, then has to match that roll, I keep getting stuck in a loop. I'll paste the function that this takes …

Member Avatar for SndSystm
0
110
Member Avatar for xcruiser

I have an assignment to submit tomorrow. It gives me compiling errors. About 62 in VC++ 2008 and 42 in VC++ 6. I have written this code in one single file and it works fine there. One error that I can think of is with the declaration of class variable …

Member Avatar for seanhunt
0
1K
Member Avatar for StillCrazy

Hi everyone. I am new to this web site. Found it while doing some research. My need is as follows: I am modifying a healthcare Practice Management System for a company in Jacksonville, Fl. and the client wants to be able to create basic BAR and PIE charts. There is …

Member Avatar for Ancient Dragon
0
95
Member Avatar for meistrizy

Thanks in advance for your help. The problem is this: I am supposed to read an array from a file and ask the user to input a name to search for within the file. If the name is there then return the position number in the file, if not output …

Member Avatar for meistrizy
0
129
Member Avatar for Peyton

Hi there, The Wallis product is defined here: [url]http://en.wikipedia.org/wiki/Wallis_product[/url] I am having a problem with the following code, which attempts to approximate the product: [CODE]#include <iostream> #include <cmath> using namespace std; int main() { int n = 2; // initialise top counter as 2 for the first two terms int …

Member Avatar for greg022549
0
1K
Member Avatar for phoenix2391

Ok, I'm not too sure if this would be considered a matrix, but what I'm trying to do promts the user for 2 characters, and one integer. For example, say you key in * G 3 the cout would be... *G* G*G *G* If you keyed in % $ 5 …

Member Avatar for StuXYZ
0
79
Member Avatar for daviddoria

According to this: [url]http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13[/url] One way to keep only the function declaration in the .h file is to do this [code] ////////// file: Tools.h #include <iostream> #include <vector> using namespace std; template <typename T> T Sum(vector<T> &V); [/code] [code] ///////// file: Tools.cpp #include "Tools.h" #include <iostream> #include <vector> using namespace …

Member Avatar for mvmalderen
0
286
Member Avatar for ademsaykin

Dear AncientDragon I have been learning c++ for two months only. Now,I am trying to understand pointers in c++.Your advise always be helpful to me. As far I understand a pointer is an address.As an example p1(pointer1) has this {x1,y1} address.So Pointer2 has {x2,y2}. There should be three different files …

Member Avatar for Ancient Dragon
0
88
Member Avatar for southernd0529

trying to get the program to run but there is an error in line 31 (expected primary expression before else) i dont know what to do [code=cplusplus] // Devin Southern // COSC 112 - Spring 2009 // Dr Stone // Lab 9 // This program will use loop to keep …

Member Avatar for southernd0529
0
139
Member Avatar for pt_solar

I'm new to this and I'm a beginner at c++. I need some help with some questions that I've been trying to solve for hours. I think I got most of this one right but I got stuck at the wages array. This question says : write a program that …

Member Avatar for pt_solar
0
1K
Member Avatar for daviddoria

To remove duplicates from a vector, my first thought was to insert them all into a set, it would take care of the uniqueness of the elements, and then read them back out into my vector. However, I have a vector<Point>, where Point is a point in 3d space (ie. …

Member Avatar for daviddoria
0
210
Member Avatar for bluebird

The assignmento I have to write is to Derive a class DistSign from class Distance which contains inches and feet as a protected data, to add unary + or – to the distance. Write no argument and two argument constructor. Here is my program. I don’t know how to add …

Member Avatar for MrSpigot
0
85
Member Avatar for YingKang

This is a part of the problem in my homework. I have : int alpha[20]; int beta[20]; int inStock[10][4]; I need to write a function copyAlphaBeta that stores alpha into the first five rows of inStock and beta into the last five rows of inStock. my program is here, but …

Member Avatar for YingKang
0
199
Member Avatar for kuru225

Hello All I am having some problems with a C++ class that i am taking and after looking around on the web I am still lost. The assignment that I am working on right now is as follows: [ICODE]Two numbers are entered in from the keyboard. If the larger number …

Member Avatar for kuru225
0
164
Member Avatar for gnit

I'm trying to create a simulation for a service line at a super market. The program builds just fine, but when I run it, I get: "Debug Assertion Failed! Program:... File:c:\program files\microsoft visual studio 8\vc\include\deque Line: 97 Expression: deque iterator not dereferencable" [code=c++] #include "stdafx.h" #include <iostream> #include <queue> #include …

Member Avatar for gnit
0
117
Member Avatar for bluebird

hello everybody! As far as I understand, the functions that are only different in return type are not allowed. But how can I write the program for the following question? ***************************************** Create two classes DM and DB which store the value of distances. DM stores distances in meters and centimeters …

Member Avatar for Narue
0
161
Member Avatar for bluebird

In this program, although I use Ignore(1000,’\n’); why it does not show the title for tape. In fact, I don’t understand very well about Ignore(); what is the meaning of 1000 in that function? [code] #include<iostream.h> class Publication { char title[20]; float price; public: void putdata() { cout<<"\nEnter title:"; cin.getline(title,20); …

Member Avatar for Narue
0
267
Member Avatar for 11silversurfer1
Member Avatar for Nick Evan
0
151
Member Avatar for ganmo

Hello, I have some weird problem with this code. The problem is that when I use >> to read data a text file to vector. It will only add the first double and discard the rest. Anyway if I use array instead of vector it works fine. Anyone know what …

Member Avatar for ganmo
0
162
Member Avatar for Sallad

I know that you can make a derived class object equal to a base class object, but I don't know how to do it the other way around. Here's the part of my code that I'm having difficulty with (Note: Animal is base class; Lion and Dog are derived classes). …

Member Avatar for kbshibukumar
0
145
Member Avatar for ahvicm

how can i insert the code for entering a password here?? the password should be in the main window...and it should be replaced by asterisk...HOW??? tnx [code] #include<stdio.h> #include<conio.h> #include<dos.h> struct phone { char name[20]; char ad[40]; char ph[20]; }; struct phone ar[100]; int n=0; void wfile(); void rfile(); void …

Member Avatar for mvmalderen
0
84
Member Avatar for FrancisC07

hi! ^_^ i am very confuse on how to edit an external file? can someone tell me?

Member Avatar for skatamatic
0
94
Member Avatar for sid78669

Following is a function I wrote to get a line of definite length from a long string. The line is also word-wrapping to make sure no words are splitted: [CODE=C++] char * getLine(char * str, int length, int start, int lenSent){ int index = 0, //Index number of the current …

Member Avatar for sid78669
0
140
Member Avatar for endisbegun

so...i dont really understand my project -_- the teacher is asian as am i but he does not write english very well :3 can i get some hints maybe? ^_^ thank you i really appreciate it ive been stumped for such a long time :O "I typed the following 2 …

Member Avatar for endisbegun
0
91
Member Avatar for atreides27

now...like...i need to concatenate the two words that the user enters, s1 and s2 and output them...i thought i needed to use strcat but like...i dont really understand how to do that here, do i need to make a new c string variable or...? ah i hate this stuff lol …

Member Avatar for SeeTheLite
0
143
Member Avatar for OffbeatPatriot

I'm trying to make a program to view 3d volumes. Basically you start with a bunch of data from an ultra sound or mri and then you load it into a 3d texture. Then you have a cursor made of three components between 0 and 1, and when you draw …

0
62

The End.