Beginners - September 2015 (Page 16)

working on a simple project
 
Hello. I am working on this simple code and I am having trouble with the if statement to execute the "cout statement" below. Can anybody help me with this cod...
[1 reply] : Line 20: You're trying to compare two char arrays with the == operato... (by AbstractionAnon)
by Chubby
BNF grammar
 
I know I should have try it first but I dont understand what is this asking about. My english is my very bad. Can you please telling in easy english. PLus this ...
[1 reply] : Here is what I have try for <for loop> ::= for ( <expression> ; <... (by Chubby)
range error question
 
try to using range error to reject non-numbers as input #include "std_lib_facilities_4.h" const int amendments_count = 27; int main() { vector ...
[3 replies] Last: If you use the at function instead of the subscript operator it wi... (by Peter87)
Text file has an unexpected carriage return
 
Hi guys, I have a small data file named Itemdata.dat. It is as follows: dagger} a dagger} 1 1 1 torch} a torch} 2 1 7 glowstone} a glowstone} 3 1 11 ratio...
[5 replies] Last: The problem is hta your file looks like that (notice newline symbols):... (by MiiNiPaa)
by BEARS
Difference between \n and end1
 
Im confused about the differences between placing a \n in a string (or char) literal to be output and inserting an endl into the stream. Someone told me that ...
[8 replies] Last: Good information. (by Newdelhidentalclinic)
by ygkuan
Need help on CLASS
 
Is my start_car() and stop_car() correct? Where do I set the bool start in CarSpeed? I am supposed to compute the velocity using the formula: acceleration * t...
[2 replies] Last: Please use code tags: [co de] Your code [/co de] Read this: http://w... (by coder777)
Rock Paper Scissors
 
how can i make another statement when i enter other letters excluding R,P,S printf will be Invalid Letter. I hope someone can help im just beginning in turbo c+...
[10 replies] Last: I find that the cleanest way to do this sort of checking is while (tr... (by dhayden)
by BEARS
Code Fragments!?!?
 
I need help finding the code fragments in these examples. I'm new to programming so an explanation would be great too! 1. They may be logic or syntax error...
[5 replies] Last: Would you have to use a static_cast? Yes, you you have it in the wro... (by dhayden)
Default argument not at end of parameter list.
 
I am trying to create a header file for a Patient class. Where I am having trouble in the first place is creating the default constructor. Whenever I put the Da...
[4 replies] Last: Patient(int id = 0, const char* fn = "John", const char* ln = "Doe",... (by coder777)
PRoblem with cin/cout and unused variables
 
Im trying to make a code that outputs someones earnings after various deductions. As of right now im getting an error on the constants saying that the variables...
[2 replies] Last: Thanks i got the program working! (by jdeepzz)
How do i use forward slash for the input?
 
I'm trying to make a basic code but i can't use "/" for an input. everything is good but when it goes to the part to enter the date and i put a forward slash, ...
[7 replies] Last: Thanks for the information. (by kenchertours)
Type 'double' unexpected error.
 
I tried to compile this but it wouldn't let me because of this error. I want the average to be the total of the num1 and num2 Any ideas? #include <iostream> ...
[3 replies] Last: It works!! Thanks so much you guys! (by ruroni24)
r6010 abort() has been called
 
Hello, i am having this following error and here bellow is my code! The error i am getting is when b.ListA enters the function insert in the AList class. Can...
[9 replies] Last: the AList class worked fine for ListM (the list of majors) and i did a... (by Lesterberne)
Where to begin? (Application development)
 
For quite a few years (on and off) I've been drilling in the fundamentals of C++ with console applications. I'm at a point where I'd like to try to develop some...
[12 replies] Last: This info helps to understand how to start development. I like to shar... (by justinstuart)
moving from linked list to double linked list
 
So I have working code for inserting things into a single linked list, and a double linked list. I need to go through the single linked list after data has bee...
[1 reply] : I would just create an insert() function for doubly linked list clas... (by DyslexicChciken)
Using a letters value, not the letter itself
 
I want to have various arrays, named things like Row1, Row2 etc. If j is a loop counter that I'm wanting to run through each possible value, how can I access t...
[2 replies] Last: Or you an use 2D array for example when j=1 access array (by LendraDwi)
Expected a class or namespace
 
I just started making constructors for my class and for some reason, my class keeps giving me the following errors: -expected a class or namespace -expected u...
[2 replies] Last: Thanks, that was a big help :D (by ProgrammerSoul)
Pop in O(1) - stacks
 
Hello. I'm making a stack from scratch and I've realized I can't find a way to get a pop operation to work in O(1). I know it has to be simple but I am having a...
[4 replies] Last: That solves a huge issue I had. Thanks to Duoas for the example and fi... (by Powdertrail)
Assistance needed on my code.
 
So we have to write a code that uses vectors and the topic is asking for amendment between 1 and 27, then when user enters 1 it should output amendment 1 with a...
[4 replies] Last: Oh ok, thank you! (by WhatHaveIChoosen22)
by C0UG3R
Stuck in an infinite loop
 
Here's an example of the file I'm working with: Saw 10 33.82 Drill 8 27.58 Hammer 23 76.34 Nail 13 9.54 Screwdriver 54 10.34 Boxcutter 23.11 I'm tryi...
[1 reply] : Just a note: you don't need '\n' since default delimiter is '\n' . ... (by DyslexicChciken)
September 2015 Pages: 1... 1415161718... 42
  Archived months: [aug2015] [oct2015]

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