49,766 Topics

Member Avatar for
Member Avatar for picass0

i have a text file that has delimiter. i wanted to display the test file that will take away the deliminter from my text file. i search through the net was told to use getline() which can include the deliminter. Hope that is someone who can show me an example …

Member Avatar for Nick Evan
0
91
Member Avatar for Heli

Hello, I've been Google'ing(?) like crazy for the last hour or so trying to find an answer to my problem, however the problem is simply that I'm not too sure [i]what[/i] to search for :S My basic problem is that I want to change the default way in which the …

Member Avatar for Nick Evan
0
158
Member Avatar for dpfaff

I am taking a introduction to C++ programming class in college and I am having some issues with my assignment. If anyone can help It would mean a world of diffrence to me. Thanks in advance. Okay the assigenment is to write a program that simulates the lottery, the program …

Member Avatar for Ancient Dragon
0
269
Member Avatar for nurulshidanoni

Can anybody help me whis this error? in red colour... error C2109: subscript requires array or pointer type error C2109: subscript requires array or pointer type : error C2109: subscript requires array or pointer type error C2664: 'void __cdecl std::swap(int &,int &)' : cannot convert parameter 1 from 'int' to …

Member Avatar for Agni
0
955
Member Avatar for kalodakilla

my final assignment is about making a program like a TinyGoogle.. But actually, i'm just a Freshman and it's kinda hard to have all the knowledge to make these all through.. Hope u guys can help, thanks a lot [URL="http://kalodakilla.googlepages.com/CS162-Final-Project-TinyGoogle.pdf"]http://kalodakilla.googlepages.com/CS162-Final-Project-TinyGoogle.pdf[/URL] The first problem is that i dont understand what does …

Member Avatar for dougy83
0
93
Member Avatar for littlestone

For a singleton class, there is only one instance in a process, so it's not necessary to define a member function as static, am I right? Thanks in advance.

Member Avatar for dougy83
0
281
Member Avatar for allialli

[B]hi. can anyone please help me with this assignment?[/B] Write a function called divideMe which takes two integer parameters x and y and returns a double which is the division of these numbers (x / y). If y is zero, print the message "Divisor can not be zero!" and return …

Member Avatar for allialli
0
320
Member Avatar for Ryano24

I wrote this code to re-create the classic race of the tortoise and the hare and everything compiles fine. Just the logic is messed up. When I run the program all I see is BANG AND THEY'RE OFF and who wins. I should be seeing a T for the Tortoise …

Member Avatar for vmanes
0
1K
Member Avatar for sohamghosh

My code for address book is as follows: [code=cplusplus] #include <iostream> #include <cstring> using namespace std; struct { char name[101][30]; char telephone[101][8]; char email[101][20]; char address[101][50]; char postal[101][6]; }employee; void enter() { int n; cout << "Number of entries?\n"; cin >> n; for (int i=0; i<n; i++){ gets_s (employee.name[i]); gets( …

Member Avatar for sohamghosh
0
97
Member Avatar for aquariusdragon2

I have this coded out but it keeps giving me the error message "ifstream" does not have a type. I don't know what to do, sigh. Any help would get appreciated. const int MAXSIZE = 100; double votes[MAXSIZE]; // declaration for array double vote; int count = 0; double total …

Member Avatar for vmanes
0
142
Member Avatar for sommanatt

I have more fluently in writting Java but for this program my advisor need me to convert my program from java to c++. I've already done with c++ code and the result is correct and got the same result as java program but the big problem is that the program …

0
83
Member Avatar for stan.joe1

I wants to input a list of day temperatures and count the number of days with temperatures above 20 degrees. The C++ program below is supposed to do this and display the result. A temperature of -100 indicates the end of the data. #include <iostream> using namespace std; int main( …

Member Avatar for dmanw100
0
324
Member Avatar for Adrian99420

Hi, I created a GUI which contain a few tabpage, I wish to add and name a new tabpage with a single button click. Therefore, I created two window form. With the "add new operator" button, I link to the second form which allow user to key in the name …

Member Avatar for Adrian99420
0
89
Member Avatar for usiel

PLease can somone check it and give me some feedbacks [CODE]include <iostream> #include<iomanip> using std::cin; using namespace std; int max=100; void general_options(); void input(int A[], int maxValue); void input(int A[], int howMany); int count90 (int A[],int howMany); void add10(int [], int howMany); void printGrades(int [], int howMany); main() { //variables …

Member Avatar for usiel
0
94
Member Avatar for CE Student

This is my assignment I have to send it today and this week I have many test and I did not any time for solve it please please I need help ITCS102 Assignment #5(chapter 12) Create a class called Employee that maintains information about an employee in a company, each …

Member Avatar for Narue
0
135
Member Avatar for fusi0n423

Hi all I'm new here I've been working on a project that has a multiset class. I need a function that accepts a integer value and returns the value held there. The multiset is a data[SIZE][2] where everything is stored where data[i][0] is the number and data[i][1] is how many …

Member Avatar for fusi0n423
0
123
Member Avatar for cuddles23

Im working on this program: to write a program that displays the last 10 characters in an order that is reverse of the order they were entered... i've gotten this so far: #include <iostream> #include <string> using namespace std; int main() { string message; cout << " Enter a string …

Member Avatar for vmanes
0
94
Member Avatar for rustyj110

I am trying to create a text-based menu class to give myself a way to create more dynamic menus in programs. Basically the menu class has a vector of option classes that contain the menu-option's name, function to call etc. The problem is that I want to be able to …

0
61
Member Avatar for TPclan

I am an extreme new comer to C++. Currently I have written a short script in VBscript to delete two specific files on a specific day. This script is set in the start up menu so that it checks for the day of the week. If the day matches the …

Member Avatar for Arne Kristoffer
0
126
Member Avatar for Roebuc

I am working with classes for the first time. I am trying to make an address book. While I think I have done my header files and class definition files correctly, I am running into a snag with getting it to show on the screen. I went back to a …

Member Avatar for Roebuc
0
106
Member Avatar for DJ-KhaosTheory

Gretting fellow coders, I am making a RPG, and need some assistance with the MCI commands. I only have knowledge of namespace std, and any complex code without namespace will be over my head. I am using it for playing mp3 files. I need: the open player call the load …

0
77
Member Avatar for superjacent

I've just completed an exercise from a book wherein the task is to display a menu of choices each associated to an alphabetical character. The program is to reject invalid characters and only finishing when a valid choice is made. Below is my solution, it achieves the task but I'd …

Member Avatar for jade09091990
0
186
Member Avatar for navamous

I have to program an Address book program in C++. So far I've done about 40% of the assignment. The main requirements of the Address Book are the following (Which I am confused about are): 1. Display 20 Contacts at a time, using the space bar to go to the …

Member Avatar for Spagett912
0
217
Member Avatar for sopel39

suppose we have template class X and template function template <class A, class B> A* g (B&); how to make something like that? template <class T> class X { template <class A, class B> friend B* g (T&); }; i mean that g<A, B> () is only friend of X …

Member Avatar for vijayan121
0
108
Member Avatar for Skeezo

Hello when I try to compile my program I get these errors: 1>funding6c.obj : error LNK2019: unresolved external symbol "void __cdecl ContributorSort(struct Contribution * const,int &)" (?ContributorSort@@YAXQAUContribution@@AAH@Z) referenced in function _main 1>C:\Users\Big Z\Desktop\program 6\Debug\program 6.exe : fatal error LNK1120: 1 unresolved externals what could be causing this? [code=C++] #include <iostream> …

Member Avatar for Skeezo
0
425
Member Avatar for sjcomp

Hello, I'd like to split a string into smaller parts using delimiters that are longer than one character. I'm curious if boost::algorithm::split can be used for that. I can not figure out what predicate I should give it to compare strings [CODE=C++] #include <vector> #include <string> #include <boost/algorithm/string/split.hpp> std::vector< std::string …

Member Avatar for sjcomp
0
5K
Member Avatar for snakeman

I've created simple C++ ATL Web Service in VisualStudio 2005 Is it possible to host it in Apache or some another web server exept IIS? Any help will be really appreciated. Thanks

Member Avatar for Ancient Dragon
0
147
Member Avatar for dmanw100

I finally broke down and wrote my first header file, but one of my functions is acting a little weird... This function is supposed to convert from Celsius to Fahrenheit but whenever I call the function, it returns an incorrect value. Is there an easy way to multiply the float …

Member Avatar for dmanw100
0
110
Member Avatar for zaza_thegreat

please help to with this program by mainly using arrays and pointers ,... i need this program to check 2 matrix files "if they contain any character and if they contain cout<<"invalid"; " and to open them from .txt file [code=cplusplus] #include<iostream> #include<fstream> #include<string> #include<cmath> using namespace std; int main() …

Member Avatar for Nick Evan
0
210
Member Avatar for kux

plz take a look at the following code [CODE] #include <iostream> #include <string> #include <iostream> #include <string> using namespace std; class A { public: string sa; A(string sia); }; class B:public A { public: string sb; B(string sia, string sib); }; A::A(string sia):sa(sia) { } B::B( string sia, string sib):A(sia),sb(sib) …

Member Avatar for Agni
0
260

The End.