Beginners - February 2017 (Page 29)

Error EXC_BAD_ACCESS (code=1, address=0x0)
 
Hello Everyone, I have been programming a small RPG game based on the console interface. Recently I started programming the way monsters are created using ...
[4 replies] Last: Thank you for the replies. As Peter said the problem was here: nmon... (by BlueOctopus)
function parameter issue?
 
Hi all... Just starting out with c++.. I've been programming for a long time but not very long with c/c++... See below; a function that converts an ASC strin...
[6 replies] Last: Thanks very much for the help. I'll be working on wrapping my brain a... (by Trondyne)
Classes, overloading >> to read object from file
 
Hello, I am finding some difficulties overloading the >> operator to read from file. Here is the program(the part that needs help!) // CLASS DEFITION // in...
[3 replies] Last: SOLVED! I figured out what i was missing. istream &operator>> (ist... (by longberns)
Range based for loop and arrays - Bug!
 
I know there is an alternative to this code which I have already provided, but is there any way to fix the bug with the range based for loop ? #include <i...
[3 replies] Last: > is there any way to fix the bug with the range based for loop ? The... (by JLBorges)
by rgibbs
cin stream not closing????
 
so for some reason that i do not understand this code below(a void function) looks as if it should work fine but it always replaces a with what ever v is. ...
[16 replies] Last: yea thats exactly what i was getting confused on ,, (by rgibbs)
look for specific letters in a string
 
I am trying to write a code where the user inputs a string of RNA and is told whether a stop codon and start codon exists. In order to "start" the string must ...
[9 replies] Last: Using std::regex #include <iostream> #include <string> #include <re... (by JLBorges)
Advancing a C-string
 
Write your question here. I am having trouble understanding this. If a const char* c_string contains a string such as the one shown below, why does advancing t...
[4 replies] Last: Precedence! Forgot about this.. Thanks for that.. I completely unders... (by dominover)
Why do I keep getting a core dump
 
So my professor gave me a matrix class some time back and I decided to start messing around with it, to give it new functions for addition and multiplication, b...
[4 replies] Last: I figured it out, basic mistake. I was calling on location (1,1) in a ... (by Miles Hikari)
vector<string> with commands c++
 
I need help on the void insert function please. How do I get it to output the insert and the index function ? Write a program that creates a vector of strings...
[3 replies] Last: OP: don't start multiple threads on the same topic, how do you think i... (by gunnerfunner)
classes and constructor using strings C++
 
Personal Contribution: Obviously there are much easier way to do this code, but for the purpose of learning, it is basic. #include <iostream> using...
[6 replies] Last: [quote=Kourosh23]Inside the function get_result, you can create anothe... (by Cubbi)
Help with my three digit sums and products code.
 
Hi, I am in need of some quick help with my code. It is supposed to test all three digit numbers for when the sum and product of the individual digits are equal...
[6 replies] Last: that did it! thank you! (by mmoreno33)
wages with overtime_pay and triple_pay
 
hello I am doing an assignment for a class that involves using wages i have to Write a program that computes an employees pay Monthly (4 weeks). The program sh...
[1 reply] : if ( hours > 40 ) regularpay = 40 * payrate; else regularpay ... (by cire)
displaying data in linked list
 
How would I display this linked list in order from least to greatest, with this function? node *temp = list; while (temp != NULL) { cout <...
[1 reply] : For that you'd have to sort the list first. Assuming yours is a single... (by gunnerfunner)
Command line tests. How to satisfy tests in one line.
 
Hi, I'm a noob here plz be gentle. My code is supposed to print out all of the command line arguments passed to it. Plus, each argument should be separated from...
[9 replies] Last: As JLBorges mentions above: Command line arguments are strings in t... (by gunnerfunner)
The initialization vector with multiple data types or object classes
 
The task, like a book library. There is a class book that lists the author, title, year of publication. I want to create a separate class DataBase where the pre...
[1 reply] : 1. define the overloaded ctor: Book (const string& autor, const strin... (by gunnerfunner)
by toklo
Decimal to Hexidecimal
 
The only problem I'm having is that it's in reverse order. I can only use the libraries listed in the code. Do I need to create an array to store each character...
[6 replies] Last: I can only use the libraries listed in the code. Here. While this ... (by mbozzi)
Finding out if a number is an achilles number
 
My code below should show if the number if an achilles number or not, I am inputting "500" and it is indeed an achilles number, but my program says it is not. ...
[1 reply] : is_powerful() is completely wrong. It returns true if there's any nu... (by helios)
Program displaying unexpected total of 1
 
Hi, I'm putting together a Blackjack program (yes it's homework, no I'm not looking for answers, just a hint or pointer in the right direction. The issue is t...
[2 replies] Last: AAAARRRRGGGGGHHHHHH What I really meant to do was determine it if equ... (by mastakhan)
command line arguments
 
Write a C++ program that prints out all of the command line arguments passed to the program. Each command line argument should be separated from the others w...
[1 reply] : # include <iostream> # include <cstring> int main(int argc, char** a... (by mbozzi)
Header Documentation?
 
So my university professor wants us to use a header documentation to display all our student information, and stuff about the program like main variables and st...
[1 reply] : Is your question about actually typing the flower box or the contents ... (by mbozzi)
February 2017 Pages: 1... 2728293031... 37
  Archived months: [jan2017] [mar2017]

This is an archived page. To post a new message, go to the current page.