49,766 Topics
![]() | |
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 … | |
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 … | |
[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 … | |
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 … | |
// 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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
Hello everyone, I am currently working on my final year project and i encountered some problems with my software when using TI CCS. Right now, i am trying to print out a value from a variable and display it out into my LCD screen. I am currently using MSP430g2232 and … | |
I am creating a MAC Database for my home network which shall contain a list of names of those on the network and allow me to quickly search for people when I get a warning about a user. I am using switch statements to go to each main section (sorry, … | |
I am just starting to use Visual Studio C++. Before I was working with UNIX (years ago). It looks like there are many things that I need to know. I copied a program from CPlusPlus.com and tried to compile it as a CLR console application. This is as far as … | |
hye..its kinda easy..but i still cant solve it.. [QUOTE]1.Write a program that has an array of at least 10 string objects that hold student’s ids and names, you may make-up your own strings or use the following: “1000614921, Abdulkadir Musa Jibrin” “1000717859, Abdulwahab Ali Esmail Al-Nawah” “1000716597, Ahmed Ebrahim Mohammed … | |
hello , whet i compile , i get these errors , but i dont know where i mistaked g++ -Wall -o "untitled" "untitled.cpp" (in directory: /home/btwnix/Documents/Projects) untitled.cpp: In function ‘std::string bunnynames(std::string)’: untitled.cpp:14:14: error: no matching function for call to ‘tolower(std::string&)’ untitled.cpp:14:14: note: candidates are: /usr/include/ctype.h:116:12: note: int tolower(int) /usr/include/ctype.h:116:12: note: … | |
Can anyone tell me about the "pseudo stack" ?? Also tell me some implementation... I have googled but there is nothing.. | |
I HAD A PROBLEM IN MY PROGRAM. MY PROBLEM IS ON HOW TO COMPUTE THE MONEY BREAKDOWN OF THE WITHDREW MONEY. PLEASE HELP ME..THANKS FOR ALL COMMENTS AND SUGGESTIONS.. #include<iostream.h> int main(){ int bd; char transaction; int withdraw, deposit, money; double balance = 50000; cout<<"What transaction do you want?"<<endl<<endl; cout<<"[1]DEPOSIT"<<endl; … | |
So I have an assignment where I have to read in a file that contains 6 blobs of X's, and delete them one blob at a time using a recursion. The blobs of X's don't touch, so once it hits an X, it deletes that blob of X's, adds 1 … | |
hello all, Im trying to make a command line parser and honestly am having trouble starting it. I need a function called parse which reads one line of user input and creates an array of the strings found in the input. the function should be passed the array and reference … | |
[code] <xs:complexType name="common"> <xs:attr name="audio" type="xs:string" use="required" /> <xs:attr name="firmware" type="xs:string" use="optional" /> <xs:attr name="recording" type="xs:unsignedShort" use="required"/> <xs:complexType/> [/code] I want to sort the xml above by attribute "use" and make sure all of the elements with "required" would be on top, something like [code] <xs:complexType name="common"> <xs:attr name="audio" type="xs:string" … | |
Hi, What's wrong with this code: [CODE] //Comments explain what I check int Array[9]={1,2,3,4,5,6,7,8,9}; int Integer=0; int i=8,n=0; for(int x=0;x<9;x++) cout<<"array="<<Array[x]<<endl; //Are all members ok? for(int exp=0;i>=0;i--){ Integer+=Array[i]*pow(10,exp); cout<<"Integer1="<<Integer<<endl; //Is Integer being summed fine? exp++; } cout<<"Integer="<<Integer<<endl; [/CODE] Program's function is to create an integer from array ( for example: … | |
I have an assignment that I am almost finished with but I am trying to figure out why my code won't compile. I believe the issue to be minor but I can't seem to figure out the bug. The problem call for me to build an inheritance heirarchy that a … | |
I have a snippet of code and am trying to make sure I am doing this right. Here is what I have so far and what needs to be done. Any help would be great [CODE]#include <iostream> using namespace std; const int NUM_TEACHERS = 3; class Teacher { public: Teacher(); … | |
I just had a very general question... I'm learning C++ and am seeing the term/variable RightHandSide used. What is the significance/origin of this and is this generally used with pointers? Is this just a reminder to the programmer? Thanks ![]() | |
RK TEAM YDS YDS/G PASS P YDS/G RUSH R YDS/G PTS PTS/G 1 Philadelphia 4951 412.6 3066 255.5 1885 157.1 271 22.6 2 New Orleans 4946 449.6 3566 324.2 1380 125.5 362 32.9 3 New England 4724 429.5 3510 319.1 1214 110.4 331 30.1 4 Green Bay 4414 401.3 3345 … | |
I am doing a project that produces a gradebook for an amount of students and exam scores. the project link is [URL="http://www.ecst.csuchico.edu/~chmorris/csci111/projects/06/"]http://www.ecst.csuchico.edu/~chmorris/csci111/projects/06/[/URL] There are some additional things I need to produce besides being able to print the array chart, but I am stuck and have been trying to solve this … | |
I have an assignment that calls for me to make a class called RationalNumber with the following capabilities: a)Create a constructor that prevents a 0 denominator in a fraction, reduces or simplifies fractions that are not in reduced form and avoids negative denominators. b)Overload the addition,subtraction,multiplication and division operators for … | |
I have tried everything with this problem and I cannot get it to work. My program complies and I get no errors but it is not catching my exceptions. The exception is that no grade should be less than zero or more than 100. I can find the average and … | |
Hello all, In a desktop database application i encountered a really interesting situation. I write a double value into a textbox as usual. Then i convert the value into double to use in a calculation but the original value is lost ! double doubleVal = 0.0 ; doubleVal = Convert::ToDouble(textBox3->Text) … | |
I'm trying to create a filled and unfilled rectangle class. I can easily create the filled, but the unfilled one is giving me a little difficulty. Whats going on? [CODE] void Rectangle::drawrec() { if (filled == true) { for (int row = 0; row < height; row++) { for (int … |
The End.