49,761 Topics

Member Avatar for
Member Avatar for TSharma

I am trying to use sort defined in algorithm in c++. I want to use it in vector string ( vector<string> vec) can we use it i vector string. here is my code [code=c++] #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { vector<string> vec; vector<string> ::iterator it; string …

Member Avatar for TSharma
0
86
Member Avatar for arby11886

I need some guidance on an assignment I'm working on for school. The objectives of this assignment are to read data from a binary file, use some basic class functionality, store objects in an array and produce a neatly formatting report. [code] #include <fstream> #include <iostream> #include <cstring> using std::ifstream; …

Member Avatar for WaltP
0
112
Member Avatar for kenank

Can somebody explain to me "nested class templates" or give me some links about it and some codes ? I get this theme for a homework ! (nasty profesor)

Member Avatar for Jx_Man
0
56
Member Avatar for olams

Hi, please help me with this program that i am writing. i am writing a program to create a polynomial. i set the values, but whenever, i debug it, i get this: 4x^2 + 0X^1 + 0x^0 + which do not correspond to the values that i set it to. …

Member Avatar for WolfPack
0
193
Member Avatar for andyg55

My program initially asks the user to input 3 values, x1, x2 and x3. These get fed into a mathematical equation and come out of it the other side slightly altered. The program then prints to screen the new values of x1, x2, and x3. These x values must go …

Member Avatar for John A
0
147
Member Avatar for inocntreper

I have this project but i can't display the months by name, they only come by number. i am stuck can anybody help me? Thanks [code=c++] #include <iostream> #include <iomanip> using namespace std; int main () { string month_name; // Constants for package monthly rates const double PackageA_RATE = 9.95; …

Member Avatar for Lerner
0
98
Member Avatar for mrjoli021

I am running vs2008 I am creating a new c++ program. when I try to compile I get "Error 1 general error c10100b1: Failed to load file "..\Debug\testing_email.exe". The system cannot find the path specified. mt.exe testing_email" any ideas??

Member Avatar for VernonDozier
0
84
Member Avatar for melmakrani

I want to write a program in C++ that automatically opens telnet with an IP-adress too connect to a server, and read and write to this server. could somebody please tell me how to do this? Thanks a lot...

Member Avatar for asebt
0
228
Member Avatar for inocntreper
Member Avatar for JRM
0
91
Member Avatar for sjcomp

Hello, I have a vector of shared_ptr<> I'd like to erase all those that are reset. This is how I do it. I call operator! which should return true if it's reset. Is it a good approach. There are so many ways to implement things and I'm trying to develop …

Member Avatar for vijayan121
0
123
Member Avatar for deadrabit

heyya, sorry if this is the wrong forum for this... but i can hardly be blamed =p... anyway, my line of code that gives me problem is this str[0] =ffd.cFileName; where str is an array of strings, and ffd is of WIN32_FIND_DATA type. ffd.cFileName should be of type TCHAR. my …

Member Avatar for Nick Evan
0
206
Member Avatar for VIeditorlover

Hi, I have a problem - when I close my web browser it clean up cache files. The same if is process terminated by tool like debugger or task manager. Only known way how to do it is break power, but... So is there a way how to bypass filesystem …

Member Avatar for vijayan121
0
126
Member Avatar for sjcomp

Hello, I'm using a library which creates allows me to set void* userData for some of it's objects, so I can connect their objects with mine. When an event happens I get their object and I can retrieve my class from it using casting. My question is about the performance …

Member Avatar for vijayan121
0
109
Member Avatar for look@me

i have this assigment and i need someone to help me in the solution as soon as possible because the assigment is due in 7/1/2008 the problem is D] A Tale from the Dark Side of The Moon Program: pink.(c|cpp|java) Input: pink.in Balloon Color: Pink Us: So why don’t you …

Member Avatar for ithelp
0
338
Member Avatar for Student1

Hi, I'm new here. I am having problems reading this code, to understand what each function does as I do not have much experience with this computer programming. I hope to get an idea of this code as a base, to use it as a LED blinker to allow me …

Member Avatar for Nick Evan
0
107
Member Avatar for jowereya

plz any one help me to solve this two proble befor 8/2/2008 plzzzzzzzzzzzzzzzzzzzzz helpe me >>> Problem 1: Fermat’s Theorem Program: fermat.cpp Input: fermat.in Output: fermat.out Description In a letter dated December 25, 1640; the great mathematician Pierre de Fermat wrote to Marin Mersenne that he just proved that an …

Member Avatar for Nick Evan
0
255
Member Avatar for bhuvanwip
Member Avatar for blcase

I am trying to overload the + and - operator for my class Collect class Collect is an array of movies (class Movie) so i need to add a movie to the array and subtract a movie from the array. the only way i know how to do code this …

Member Avatar for Agni
0
167
Member Avatar for infernojmd

Write a program that accepts the number of people in each of the three age categories, performs the necessary computations, and displays a bill for the group's admission similar to the display below. Be sure to test for a variety of values. Here is a sample display after three values …

Member Avatar for infernojmd
0
120
Member Avatar for kahn1

I know its easy but its been a long week of test. I have been working with a program to enter 5 integers( 1 2 3 4 5 ) then in its output it will display those same 5 integers. Then next to the last number it will encrypted the …

Member Avatar for WaltP
0
488
Member Avatar for jer_stud56

I'm not looking for a direct answer or anything considering I'm doing this for homework, but I'm a little confused on why my batting average and slugging percentage do not work. [code] batAvg = singles + doubles + triples + homeRuns / atBats; slgPer = singles + 2* doubles + …

Member Avatar for jer_stud56
0
444
Member Avatar for blcase

[code=c++] #include <iostream> #include <string> #include "Movie.h" #include "Collect.h" using namespace std; int main() { Collect c1; c1.setTitle("BestofBest"); Movie m1, m2, m3("John Ford", "Stagecoach", "Western", 96, "G", "1939"); m1.set("David Lean", "Doctor Zhivago", "Historical", 200, "G", "1965" ); m2.setDirector("John Avildsen"); m2.setTitle("Rocky"); m2.setGenre("Sports"); m2.setLength(120); m2.setRating("G"); m2.setRelease("1976"); Movie m4(m2); cout << m4.getDirector() << …

Member Avatar for John A
0
102
Member Avatar for Icetigris

I'm learning OpenGL for a class and for the lulz and I'm trying to write a program that does the following: -Open a 500x500 window with a 10x10 grid of black squares with a 1 pixel white border around them. (done, works) -Make the window resize without it going wonky. …

0
56
Member Avatar for mrjoli021

Is there an e-mail class that I can use to be able to send e-mails. I dont need to send any attachments just text.

Member Avatar for John A
0
71
Member Avatar for tootypegs

Hi I have the following string of hex '38 55 FD FF'. Somehow i need to get the value -174792 from it. I think it involves reversing the bits to 'FF FD 55 38' then showing its binary representation and reversing all the bits so that 1's become 0's and …

Member Avatar for tootypegs
0
135
Member Avatar for robotnixon

My professor gave us a set of class specifications for three classes. Vehicle, Car, and Truck. My vehicle class works fine, and utilizing it in the other classes is fine as well but I'm having trouble implementing the individual class specifications in the other two. Really the only thing I …

Member Avatar for John A
0
110
Member Avatar for kux

As i knew the <stdarg.h> header should have the following function int vfscanf(FILE *stream, const char *format, va_list ap); but under Visual Studio 2005, after including the header and calling the function i get 'vfscanf': identifier not found if the function is not declared, can u tell me some simmilar …

Member Avatar for WaltP
0
155
Member Avatar for gcardonav

Greetings I just installed Virtual and I am trying to learn from it.. I was running a program which I believe to have no problems in the coding. My question is the following.. When I try to compile the program I get the following error [inlinecode]1>------ Build started: Project: Shapes, …

Member Avatar for JRM
0
642
Member Avatar for kahn1

Having just a few problem with bring the difference of time times back into this form HH: MM:SS. I am required to you % , and fill the remaining space with 0's. Some of my code is just previous rambling that I turned into comments. Any ideas would be of …

Member Avatar for vmanes
0
106
Member Avatar for vilastadoori

I want the following pattern 123454321 1234 4321 123 321 12 21 1 1 I am able to acheive 12345 1234 123 12 1 I am not able to get the logic in the code as the lines increase the spaces should increase... Please help...this is killing my sleep. Regards …

Member Avatar for vilastadoori
0
137

The End.