49,757 Topics

Member Avatar for
Member Avatar for Thermalnuke

Alright, I am trying to count words in a file. The user running the program can choose a file that the program can count how many words are in the file. I have it working, but.... it keeps looping the last sentence [CODE]cout<<"There are "<<words<<" words."<<endl;[/CODE] over and over and …

Member Avatar for Thermalnuke
0
165
Member Avatar for lrnzsmok1

i need to write a Selection Sort program using the following functions: Get data(), Smallest(), and Exchange(). The program should include pointers. The following data should be included in the output: 23, 78, 45, 8, 32, 56. SAMPLE OUTPUT: 23 78 45 8 32 56 8 78 45 23 32 …

Member Avatar for shubhamhaowa
0
210
Member Avatar for jacob501

Hi, I want to make a specific program and I was looking around the internet for some help. I came here but wasn't sure what section to post in...so I chose this one for now! What I want to do is make a program that uses the internet and retrieves …

Member Avatar for Warezov
0
210
Member Avatar for HASHMI007

[CODE]#include"stdafx.h" #include <iostream> #include <conio.h> using namespace std; class LinkList { protected: struct node { int exp; int info; struct node* next; }; typedef struct node * NODEPTR; NODEPTR listPtr; public: LinkList(){ listPtr=0; } int IsEmpty(); void PushPoly(int cof,int ex); //void Mult(list); void Add(LinkList Poly1 , LinkList Poly2); void Display(int …

Member Avatar for HASHMI007
0
186
Member Avatar for Dakot

hello, I have a problem.I want to search by color , gender (these are the options) in a text file (called text.txt). My text file looks like that. How can i do that?) ex. cin>>s , then find for "s" , if found cout all data about him (gender , …

Member Avatar for Schol-R-LEA
0
131
Member Avatar for stereomatching

I try some codes snippet from boost spirit, but it only incur a lot of error mesasges [code] #include<iostream> #include<string> #include<boost/spirit/include/qi.hpp> void spirit_01() { namespace qi = boost::spirit::qi; std::string input("1.0,2.0"); std::pair<double, double> p; qi::parse(input.begin(), input.end(), qi::double_ >> ",">>qi::double_, p); //#1 } [/code] After some struggle, I figured it out the …

0
74
Member Avatar for Thermalnuke

Alright, I am having a problem with an error message that comes up, i am pretty sure the code is alright, but it might be the code, i have tried re-installing VB (Visual Basic 2010). i have tried a few things on the web and nothing. here is the error …

Member Avatar for Thermalnuke
0
110
Member Avatar for vincent5487

[CODE]#include<iostream> using namespace std; void convertLetter(char); void convertWord(char); int main() { char input; do { cout << "Please make a selection\nS:\tConvert a single letter to its corresponding telephone digit\nW:\tConvert a word to its corresponding telephone number\nQ:\tExit" << endl; cin >> input; if (input == 's' || input == 'S') convertLetter(input); …

Member Avatar for vincent5487
0
235
Member Avatar for vincent5487

Write a program that generates 10 (TEN) random integer numbers that range from 1 to 50, and store them in an array variable. Display the original order of random integer numbers. Then create a function that sorts the number elements from the array in ascending order and display the result. …

Member Avatar for Fbody
0
435
Member Avatar for abhiagro

can someone please help me with this code? i am getting the following error : [Linker error] undefined reference to `enr(int, int, double, double, double)' thanks #include <iostream> #include <fstream> #include <math.h> #include <string> using namespace std; float ran1(long *); #define IA 16807 #define IM 2147483647 #define AM (1.0/IM) #define …

Member Avatar for Schol-R-LEA
0
263
Member Avatar for fmasroor

Hello. I am looking for a website that I can download Microsoft Visual c++ 6.0 or whatever it's called, the compiler. Just the compiler, nothing else like those things on Mic.'s website. Please give me a good up to date link that has a free full download for the compiler. …

Member Avatar for jwenting
0
306
Member Avatar for peachekeen

Hi everyone, I am a beginner with C++ and am trying to self teach myself the programming. I have been watching tutorials and reading about it and am still getting confused. if anyone can offer help with this exercise and help me to better understand whats being done and why. …

Member Avatar for metronomu
0
132
Member Avatar for metronomu

A question regarding inheritance implementation. Let's say we have 2 classes: [CODE]class B { public: int x; // for the sake of argument it's public, don't stone me }; class D: public B { public: int x; // again x, i know ... stupid dilemma };[/CODE] Now, if you will …

Member Avatar for metronomu
0
137
Member Avatar for astrolegacy

Hiii Buddies....I am having a very frustrating time trying to understand where to start from and where to end in creating online enrollment billing system....there is tonnes of stuffs that i have no clue wat to do.....since m a beginner it is possible to help me out with the coding …

Member Avatar for WaltP
0
247
Member Avatar for spicyrelish

I think my problem is that C++ cannot work with class instances without initializing them in a more explicit way than I am doing, but I'm not sure how to go about doing that.... maybe there's an easy solution but it isn't obvious to me. does someone see another approach …

Member Avatar for sfuo
0
165
Member Avatar for coolbeanbob

Is it possible to have multiple input streams open at the same time? I know it takes a lot of time to open a file, and I am trying to be as efficient as possible. I really need to have two streams open at the same time. The data is …

Member Avatar for coolbeanbob
0
245
Member Avatar for jeevsmyd

Overload new and delete operator to manipulate objects of Student class.Class Student must contain data members like char * name,int roll_no,int branch etc.The overloaded new and delete operator must allocate and deallocate memory for the student class object and its data members. Here is my code. The problem is that …

Member Avatar for jeevsmyd
0
407
Member Avatar for cafegeo

Hello all. This program is supposed to maintain inventory for 5 warehouses with 3 items each warehouse. Each in a different city. You can place an order or send a shipment to each warehouse. When you place an order, if one warehouse does not have enough of the item it …

Member Avatar for PrimePackster
0
155
Member Avatar for Jockster

The question is: Write the declarations for variables to hold a department code (which is a letter), hourly wage, number of dependents, last name, and a constant to hold the current FICA rate of 7.75%.

0
48
Member Avatar for kareem8

i want help from visual studio experts :) when i debug an opencv code in visual studio the following exception is appear as in picture : [URL="http://imageupload.org/?d=B810B9521"]http://imageupload.org/?d=B810B9521[/URL] can any one help me please :)

0
51
Member Avatar for Thermalnuke

Hi, there im a new member, I have a few questions. i am having a problem i am trying tp find words that are related together by one word for example "dous" Tremen[B]dous[/B],stupen[B]dous[/B] ect... I have my code working so that it goes through my text file and picks out …

Member Avatar for Thermalnuke
0
136
Member Avatar for Tokenfreak

I am trying to make an expression calculator and it works ok, but only for single digit numbers. I take in the expression in infix notation and then convert it to postfix notation. I just am not sure how to allow it calculate the correct answer with double digits. I …

Member Avatar for mikrosfoititis
0
2K
Member Avatar for lmytilin

[CODE] #include <iostream> #include <string> #include <cctype> #include <iomanip> #define N 36 using namespace std; string EraseWhiteSpaces(string &str_nospaces) { int i; for (int i=0;i<str_nospaces.length();i++) { if (str_nospaces[i]==' '||(str_nospaces[i]=='\t')) { str_nospaces.erase(i,1); i--; } } return str_nospaces; } string ConvertToLowerCase(string &str_lowercase) { int i; for (i=0;i<str_lowercase.length();i++) str_lowercase[i]=tolower(str_lowercase[i]); return str_lowercase; } void SortedFrequences(int …

Member Avatar for mikrosfoititis
0
187
Member Avatar for eblanco1

It is an assignment to create a drink machine simulator. I have a problem with number 3 sprite its not alined with the rest. And i would like to know how to add special characters to add borders around the menu and create a table. [CODE]#include <iostream> #include <string> #include …

Member Avatar for eblanco1
0
241
Member Avatar for HumanBeing86

// Linked list Hi... Below is the codes that I wrote so far... everything is fine but just abit headache on when trying to read the data from the file...and it give me a weird things... my output suppose is like this [CODE]============================================================== No Name/Site Location Weight 01 ThunderStone Russia …

Member Avatar for HumanBeing86
0
123
Member Avatar for jcAmats

I’m creating a program that displays random lines from a file. I have 8 lines on my text file and after displaying the last/8th random line… it displays [B][I]Segmentation fault[/I][/B] and then terminates the program. The program should display a message saying that there are no lines left to display. …

Member Avatar for jcAmats
0
11K
Member Avatar for Octet

I am creating a database search and I am having a bit of issue when I want to return to my main menu. I have attempted to use loops with no success, could anyone suggest how I can do this? [code] #include <iostream> #include <fstream> #include <windows.h> #include <string> using …

Member Avatar for Octet
0
299
Member Avatar for eblanco1

Ok I was able to validate user input if the user would enter a larger number or a negative number but how do you validate if the user happens to enter a letter or word, even character i.e % # @, or if the user enters all. How do you …

Member Avatar for Narue
0
578
Member Avatar for Raik.48

Hello, I have chosen a project of developing a 2d action-adventure game with some rpg elements, in-game puzzles. I have considered developing with C++ and OpenGL. I do not have prior knowledge of these language but I had good grasp on C programming language. For C++ and OpenGL, I have …

Member Avatar for Raik.48
0
458
Member Avatar for learner guy

hi i am making my rook move with the help of validRook() and rookMove() functions.. i have placed validRook inside rookMove so that it is only executed when validRook return s true.. plz see if my validRook algorithm is correct(Note: this is phase 1 of my game and i just …

Member Avatar for Schol-R-LEA
0
2K

The End.