Beginners - April 2013 (Page 12)

Class Help Needed
Create a class Hangman with the following private attributes:  Words: should be a static array of character pointers with 5 elements.  Word Name: shoul...
Apr 26, 2013 at 11:31am
[1 reply] : What kind of help do you need with your homework? Currently it seems ... (by keskiverto)
by Jaffar
Giving precedence to the mathematical operators
Write your question here. I am having difficulty in giving precedence to the mathematical operators i.e. I want to implement the "DMAS" rule of mathematics. Ca...
Apr 26, 2013 at 11:25am
[1 reply] : Operators in C++ do have precedence already. Level 6 * / % multiplica... (by keskiverto)
Gross_total wrong...
everything works and calculates except the Gross_total. I don't know what is wrong with it. Help please! /********************************************...
Apr 26, 2013 at 10:01am
[4 replies] Last: @ aflangdon Just some style points. First is your variable names - ... (by TheIdeasMan)
First program with regex not working
boost::smatch matches; recvFIFO = "This Was Last-Modified"; const boost::regex pattern("Last-Modified"); const bool found = boost:...
Apr 26, 2013 at 9:18am
[2 replies] Last: This small distinction was the key, thanks! (by bartoli)
structs/arrays
struct SDate { int month, day, year; }; struct SMachineRec { int idNumber; string description; SDate purchaseDate; float cost; float payment...
Apr 26, 2013 at 8:53am
[1 reply] : Your homework, isn't it? Go ahead and do it. You will learn by doing.... (by keskiverto)
independent sort
how would i rewrite this function to sort alphabetically by case? i did it dependently course* sortByDescription(course* head) { course* newHead = 0; ...
Apr 26, 2013 at 7:36am
[1 reply] : Write your own comparsion function: int istrcmp(const char *s1, const... (by MiiNiPaa)
by vivre
Global Variables
My friend has recently responded to a member of another forum with this: The reason you use global variables is to allow the use of the variable throughout the ...
Apr 26, 2013 at 7:13am
[2 replies] Last: You can dereference uninitializated or null pointer ergo dereferencin... (by MiiNiPaa)
Counting the number of characters and lines in a given text file
So far this is my code. It needs to take from a text time (textfile1), read it, and output how many characters and lines it has. But right now all it does it ta...
Apr 26, 2013 at 7:07am
[1 reply] : You read one line at a time. Every time you read a line, the number_o... (by keskiverto)
Declaring an object that is an array?
I have to declare three objects of arrays with a named constant for the size. This is how I have it declared but in my program it says I have an error. and Cou...
Apr 26, 2013 at 5:38am
[16 replies] Last: I can name it anything I want but it was course but its asking for peo... (by closed account LN3RX9L8)
by kabuki
Help with if/else if
How would this code look like if it was in if/else if? if (hours <= 40) {gross = hours * payrate; ovthours = 0;} if (hours > 40) {ovthour...
Apr 26, 2013 at 5:25am
[3 replies] Last: It will, but do not overuse comma operator (this can lead to unexpecte... (by MiiNiPaa)
Trying to use object declared in main in another Class
Hey guys, im trying to use an object that i declared in main() and use it in another class, but im getting an undeclared variable error. Player Class: class ...
Apr 26, 2013 at 5:20am
[3 replies] Last: http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference... (by MiiNiPaa)
Need help with cout!
So when I input my name, Ryan, it says: Nice to meet you -858993460, have a wonderful day! :) but Its supposed to say Nice to meet you Ryan, have a wo...
Apr 26, 2013 at 5:10am
[3 replies] Last: Figured it out, I needed to add #include <string> thanks! (by HadMuffin)
problems
this is my assignment and below is the my code where am I wrong?....Write a program that simulates the tossing of 3 die and computes the probability of obtainin...
Apr 26, 2013 at 4:53am
[2 replies] Last: thanks lol (by cmiller9732)
by zmlink
please help me figure this out ;/
#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv ) { int amount, newAmount, interestRate; cout <<"Please e...
Apr 26, 2013 at 4:13am
[1 reply] : if possible could someone create the last steps and use // to explain ... (by zmlink)
sum and average of array
this is what code i have and i need help finishing thanks!!! Write a program that demonstrates using an array to perform some simple statistics. Your program...
Apr 26, 2013 at 4:12am
[9 replies] Last: You should study the basics again, get a good C++ Book -size Bible- ch... (by eyenrique)
if/else and goto
I was messing around with user input in code, and wanted to see if an invalid statement would reset back to the original prompt again. However... #include...
Apr 26, 2013 at 4:00am
[7 replies] Last: STYLE ALERT Things you should consider. #1: INDENT. Don't be ... (by Disch)
Random number
I was trying to make 16 random number That is from 1-8.And every number should show twice, how can I make it? The only thing I know is for(int i=0;i<16;i+...
Apr 26, 2013 at 2:57am
[1 reply] : well for one. You are missing your srand(time(NULL)) and for two makin... (by giblit)
Access violation, Project Options
So, I just installed Dev-C++ V.5.3, and the problem is that, whenever I want to access the project options, I receive this error: Application version: 5.3...
Apr 26, 2013 at 2:52am
[1 reply] : I would suggest visiting http://sourceforge.net/p/orwelldevcpp/forums/... (by cire)
Question about code in a tutorial series
The question is about something near the beginning (about 2 minutes in) http://www.youtube.com/watch?v=GoMNA4dYXvE I was wondering why he made made T constant...
Apr 26, 2013 at 2:35am
[3 replies] Last: Thank you. (by AlitCandle)
the homework
Problem: write a float A/B=1/a1+1/a2+... such as 5/6=1/2+1/3 7/8=1/2+1/4+1/8 #include <iostream> using namespace std; int main() { int c ;...
Apr 26, 2013 at 2:31am
[no replies]
April 2013 Pages: 1... 1011121314... 83
  Archived months: [mar2013] [may2013]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.