49,761 Topics

Member Avatar for
Member Avatar for launic

I have a text file that in some places have newlines in the middle. For example: My name is Sam. I am a novice programmer. I go to school in Michigan. I use getline() to read through the entire file, and then I send it to a function to tokenize …

Member Avatar for mitrmkar
0
163
Member Avatar for boncher

Hi. I am new to c++ and programing in general and have run into a problem on one of my assignments. I am trying to insert one vector, into a certain spot in another vector. Both are of the same type <string>. My main problem is we have not really …

Member Avatar for ArkM
0
109
Member Avatar for clive2008

Good evening everyone, Firstly, I just want to say this is not homework related. I graduated 15 years ago, but I dabble with C++ purely for a hobby these days but must be getting rusty in some areas. I have a question with regard to string comparisons. What I have …

Member Avatar for ArkM
0
71
Member Avatar for lmastex

Hey again! ;) This time I have this program which is supposed to read some stream file called "numbers.dat" which has the numbers 1 up to 10. I get the reading, but the thing is in the for loop I want to add the numbers in circles. For example: 1 …

Member Avatar for lmastex
0
120
Member Avatar for nizbit

The program I am working on deals with nested linked lists. I have a Olympics class that uses a linked list for events. Events have their own class with a linked list of contestants of a contestant class for each event. I don't understand why I'm getting these compile errors: …

Member Avatar for nizbit
0
130
Member Avatar for MSlattery

[B]Can someone provide me with a short list of the hardware requirements to implement a beta test version of a proposed search engine to be coded in C++?? What hardware will be required just to determine if the logic behind this architecture accurately returns the searcher's intent? As a startup …

0
31
Member Avatar for chanda gul

Hi all Can any1 tell me how to extract the author of a file in ntfs.....any class or method availbe for it???

Member Avatar for Ancient Dragon
0
113
Member Avatar for Matotore

The welcome form It contains a label, a timer and a progress bar. private void Form1_Load(object sender, System.EventArgs e) { timer1.Start(); } This enables the timer to be started when the form is loaded. These other codes have placed it on the tick event of the timer. private void timer1_Tick(object …

Member Avatar for Matotore
0
118
Member Avatar for bone7_7

I am a beginner c++ programmer, I was wondering if somebody could help me get rid of this error [code=cplusplus] #include "stdafx.h" #include<iostream> using namespace std; //declaration of function: convert miles and time, into nautical miles,kilometer,meters,feet,calculat mile per hour,calculate kilometer per hour,calculate meter per second,calculate feet per second,calculate nautical mile …

Member Avatar for bone7_7
0
204
Member Avatar for rajataggarwal91
Member Avatar for Salem
0
67
Member Avatar for unclepauly

i have a bunch of data i want to pass to CreateThread. i created a struct as per the msdn documentation. here it is: [CODE] typedef struct ThreadRecvData { std::list<char> data; Ogre::String addr; unsigned long port; } THREADRECVDATA, *PTHREADRECVDATA; [/CODE] then i initialise the struct, again as per the msdn …

Member Avatar for unclepauly
0
112
Member Avatar for quasimodo

Hi, Im new to the Forum, and I could use a bit of help. I want to code a application that rights meals to a file and generates a weekly menu randomly. I dont have a problem with writing and reading to the file, but I do have a problem …

Member Avatar for starchip
0
478
Member Avatar for VernonDozier

I've been experimenting around with the [ICODE]const[/ICODE] modifier, trying to make sure I understand it and clearly I do not. I wrote this program. Note line 28, where I am changing the value of the parameter passed to a copy constructor, and the word [ICODE]const[/ICODE] on line 40: [code=cplusplus] #include …

Member Avatar for VernonDozier
0
422
Member Avatar for kenji

Hey guys, I have a couple of quick questions, Iv searched the forums and the internet and found a not very much on removing an array element. If you could guide me to a website or a book with information on char arrays it would be helpful. My second question …

Member Avatar for kenji
0
9K
Member Avatar for geemicah

this program is all about computing the bill of the electricity/.// the first 150kilowatts will be 10.00php... then additional kilowats will be add for another 20.00 per kilowatts... In their bill also, there will be additional 5% for the tax... And My prof give this condition in doing the program: …

Member Avatar for geemicah
0
94
Member Avatar for osirus0830

Hello all, I am attempting to learn C++ on my own. I am going through the book C++ Primer by Steven Prada, in case anyone has the book. At the end of every chapter, they give programming problems and I am having trouble with one of the problems. Essentially the …

Member Avatar for arinkverma
0
90
Member Avatar for cwilliam912

I have to redo Programming Exercise 5 of Chapter 9 using dynamic arrays. I have the problem but I don't know how to use it using dynamic arrays please help. //Chapter 9: Programming Exercise 5 [code=cplusplus] #include <iostream> #include <cstring> #include <cctype> using namespace std; int main() { char str[81]; …

Member Avatar for twomers
0
242
Member Avatar for Trekker182

I've read around and made this code to loop through my two strings and add up all of the ascii values of the characters in them. However, it's not working...it's not even iterating. When I look at the cout for h and hi, I get 112 & 205976. Shouldn't it …

Member Avatar for Trekker182
0
127
Member Avatar for gregorynoob

ok, so this is my problem... i have an array of items, which i want to sum to x or above in a most efficient way... is there a way for doing this? cause all the values are 64 bit ints. i tried recursion but it's slow cause i can …

Member Avatar for VernonDozier
0
251
Member Avatar for bhoot_jb

I have been given an assignment to simulate MS Paint application. I am much confused if to use document-view architecture or go without it (i will certainly use MFC..a necessity of our syllabus :| ) Also where exactly should i use/avoid document-view architecture? waiting for a reply ... :)

Member Avatar for Ancient Dragon
0
85
Member Avatar for khushal.kakakhe

as i am new to object oriented programming can any one help me undrestanding function over ridding i know the exact statement of it but i can not implement it in my program please help me giving a programmatical explanation. REGARDS

Member Avatar for Sci@phy
0
57
Member Avatar for cplusplusdummy

Argh! I've been trying to work out this problem for an entire week and i'm now at my wits end! I'm supposed to hand in this assignment in 7 hours and am posting my problem here as a last resort. Can i please have someone's assistance in this? I use …

0
39
Member Avatar for geemicah

hi... I always having a hard time to debug all my errors.. but still, calling some functions are the most painful I guess... Will you help me on how to call some functions? thank you!

Member Avatar for geemicah
0
235
Member Avatar for Repurcussion

[CODE=C++] //bintree.h template<class T> class bintree { private: bin_node<T> *root; public: bintree(void); void insert(const T); void insert(const T, bin_node<T>*); }; //bintree.cpp #include "bintree.h" template<typename T> void bintree<T>::insert(const T input) { insert(input, root); } //tstatcontain is a non-template class-class class tstatcontain { private: string tname; int wins, loses, games, champ, years_playing, …

Member Avatar for grumpier
0
825
Member Avatar for nizbit

I have a class named Contestant which holds all the info on a person playing a game. Then I have a game class for all the different games a contestant could be playing. My linked list in the game class is defined by the contestant class. I need to swap …

Member Avatar for Lerner
0
87
Member Avatar for bodomchild

Hey there, I'm kinda new to Programing and I'm still learning the basics, I have Borland C++ 5.5 program and I need to write the following program in it, any help about it would be very appreciated, please reply ASAP :) The Program is the following: [B]Write a program to …

Member Avatar for bodomchild
0
136
Member Avatar for iichi07

This another project and it is called Complex Class. Create a class called Complex for performing arithmetic with complex numbers. Y=Use double variables to represent the private data of the class. Provide a constructor that enables an object if this class to be initialized when it is declared. The constructor …

Member Avatar for iichi07
0
259
Member Avatar for atreides27

lemme preface by saying I have read the homework sticky, am not looking for someone to just give me an answer...more then anything I just want to understand this stuff...just am not looking to step on any toes and wanna make sure that's clear, and that I hope someone can …

Member Avatar for William Hemsworth
0
108
Member Avatar for Hinche4

I have a class screen and a class Brush both have header files and source files. The driver file shown first was provided to us so nothing should be wrong with it but I wanted to show you how it worked. [code] #include <iostream> #include <string> #include "Screen.h" #include "Brush.h" …

Member Avatar for Hinche4
0
298
Member Avatar for nizbit

I have a recursive method that traverses a linked list for a first name or last name then deletes the node from the list. This is what I have: [CODE=cplusplus] void game::DeleteR(string first_name, string last_name, ListNode* &node) //throw (ContestantException) { /* See if we are at end of list. */ …

Member Avatar for nizbit
0
181

The End.