Beginners - March 2017 (Page 35)

qualified id identifier declaration before (
Write your question here. class labf { private: double volumec; double volumes; double volumer; //cylinder double side; // side double...
Mar 2, 2017 at 1:54am
[1 reply] : Line 24: pi is not defined Line 18: It's a poor practice to have an... (by AbstractionAnon)
Namespace
Quick question: Does declaring an entire namespace affect a program's performance vs not declaring the entire namespace and doing something like std::cout. ...
Mar 2, 2017 at 1:41am
[3 replies] Last: Does declaring an entire namespace affect a program's performance De... (by gunnerfunner)
Code Efficiency C++
For larger programs, code efficiency starts to become a big deal. Does it matter if we say (size > 0) or (size > capacity) regarding capacity += size ? ...
Mar 2, 2017 at 1:19am
[3 replies] Last: To be honest in "larger programs" code efficiency is hardly ever the ... (by AlanG)
Switch Statement Help
,, easp
Mar 1, 2017 at 10:52pm
[4 replies] Last: Since you used toupper then you don't need to test the lower case. Th... (by joe864864)
strchr() question
I saw some pretty bizzare use of strchr() in a 2009 exam subject.. char* s; strcpy(s, "info"); int i = strchr(s, 'i') + s; //What does the +s d...
Mar 1, 2017 at 8:08pm
[3 replies] Last: Thanks! It was substraction after all. It just seemed very.. bizzare. ... (by InsanelyNormal)
Bool functions and Tic-Tac-Toe
Hey guys, I am writing a code to give the result of a tic-tac-toe game. Specifically, every possible board combination is read in as a .txt file where each line...
Mar 1, 2017 at 6:12pm
[5 replies] Last: Line 76: If getWinner() returned false for all calls at lines 67-70 ... (by dhayden)
How to raise something to a power using bitwise
My professor said that we should know how to raise some number to some power using bitwise. I've searched the internet and reviewed his powerpoints and I think ...
Mar 1, 2017 at 5:31pm
[2 replies] Last: Thanks. I can follow that. I appreciate your help. (by GoonerBrian)
Program produces unreachable locations in the maze
So I'm trying to create a program that generates a maze using depth-first search. For the most part, this program is finished but what irks me is that the progr...
Mar 1, 2017 at 4:25pm
[6 replies] Last: Yep that was the problem lastchance thanks. (by deathslice)
how do i end a function
if it is 0 or negative i want the user to input the shape again //enter shape-------------------------- int choose; cout << "Select a shape: " << ...
Mar 1, 2017 at 4:15pm
[2 replies] Last: you can end a function at any time with the return statement. if the ... (by jonnin)
Single Link List Problem Deleting Node
Node is not deleting #include<iostream> using namespace std; struct dellist { dellist *next; dellist *add; dellist *head; dellist *last; ...
Mar 1, 2017 at 2:40pm
[6 replies] Last: can you explain this This is the way to unlink del1 from a singly l... (by coder777)
External library text game error
I'm supposed to write a text adventure game that makes use of an external library, but I ran into a bit of a snag. I got "error: expected primary-expression bef...
Mar 1, 2017 at 2:03pm
[12 replies] Last: Erm, what? "lizard.h" isn't even an actual file. I'm not using a head... (by AbstractionAnon)
Please help me on my program
I'm having so much trouble with my own program. I tried to ask the user for the size of the array. But ends up keep telling me about the variable "input" is n...
Mar 1, 2017 at 1:48pm
[10 replies] Last: #include <iostream> #include <string> using namespace std; void ini... (by closed account 48T7M4Gy)
Help with absolute value and if statement
Hello guys. I am trying to write a script for a simple calculator. that does addition, subtraction, multiplication, division, power and absolute value. I have...
Mar 1, 2017 at 11:36am
[13 replies] Last: #include <iostream> #include <string> #include <cctype> #include <cma... (by JLBorges)
by AlanG
Problems with using nullptr in g++
How do I check which C++ version my copy of g++ supports? $ g++ --version g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 Copyright (C) 2013 Free Software Found...
Mar 1, 2017 at 11:27am
[3 replies] Last: Thanks folks, that works. (by AlanG)
by wasey
Another Set of Eyes on my Errors?
I'm lost at sea and am hoping someone could help steer me in the right direction. I am supposed to write a modular program that reads a student's name and score...
Mar 1, 2017 at 10:23am
[7 replies] Last: #include <iostream> #include <string> #include <cmath> using std::st... (by closed account 48T7M4Gy)
by xx123
Can formulas be put into header files?
So I have to create a program that asks the user for the amount of miles and gallons that they used in their car for the trip and compute the miles per gallon a...
Mar 1, 2017 at 9:53am
[10 replies] Last: So is there any way that I can corporate the formulas like totalMiles... (by closed account 48T7M4Gy)
Trying to output in a certain way
Okay, so I am trying to have a specific output that I want to get, but it prints its out a bit differently. And I wasn't too sure how to print it implement the...
Mar 1, 2017 at 7:30am
[9 replies] Last: I needed to use the push_back function for my setPrereqs so it would ... (by coder777)
Ui console advise.
Write your question here. Hi, I'm trying to explore how to build a ui via a console command, but sadly the concepts I have learnt along the way are not really ...
Mar 1, 2017 at 5:25am
[3 replies] Last: You can use setpixel from windows.h (by Ericool)
class header file declaration?
i have made a class header file i used #include "myfile.h" but it doesnt decalre my class my class name is labf i did 'labf a;' labf is a data type an...
Mar 1, 2017 at 4:53am
[1 reply] : I see now from your other post using labf box. You need to call the fu... (by Ericool)
Class Declaration into main??
Write your question here. My class wasn't declared? #include "lab4.h" #include <iostream> using namespace std; int main() { char repeat; do {...
Mar 1, 2017 at 4:42am
[4 replies] Last: Add at the top of the header the directive #pragma_once if it is still... (by Ericool)
March 2017 Pages: 1... 33343536
  Archived months: [feb2017] [apr2017]

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