49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
[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 … | |
Hi all Can any1 tell me how to extract the author of a file in ntfs.....any class or method availbe for it??? | |
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 … | |
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 … | |
| |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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]; … | |
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 … | |
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 … | |
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 ... :) | |
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 | |
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 … | |
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! | |
[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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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" … | |
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. */ … |
The End.