Beginners - December 2016 (Page 13)

by Grimes
runtime determines bool eval (Single linked list)
 
Depending on the runtime, the bool func will eval true or false. I did the debugging and sure enough it happens. I am wondering if there is an issue with my if ...
[3 replies] Last: could the insert back method an added issue? //tail( insert back) m... (by Grimes)
Class variables question
 
I'm writing a simple pong game and have a ball, paddle, and board class. In the past I've always pretty much kept my class members/variables as I've heard that'...
[5 replies] Last: No, because you make sure you only create public getters and setters w... (by MikeyBoy)
by Chamat
Fstream function not working
 
Hello, Can somebody tell me why the following doesn't work? I loosely converted it from C to C++ (just changed it from > to >) from my textbook but calling ...
[13 replies] Last: Perhaps this style would be more usual in C++. Rather than explicitly ... (by Chervil)
How to get basic enemy unit movement on a board or grid console game in c++?
 
As the title says, i'm having trouble moving the enemy character symbols on my grid when playing my console game. I have the randomly print on the grid when the...
[1 reply] : Normally you would store your characters in a 2-dimensional array. Let... (by Thomas1965)
Help with Codeblocks calculator
 
I am very new to CodeBlocks and i am trying to make a simple calculator And i cant get it to do anything but sum,i dont know what i am doing wrong #inc...
[2 replies] Last: Thank you very much (by ficaman47)
the inheritance and the scoping
 
What are the potential problems that you can think of (AND how would you fix it?) with the following code: class Host { int x; class Nested_One extends So...
[4 replies] Last: No. If you want to make the variable global use static : http://en.c... (by coder777)
abstract classes
 
I need help in creating an abstract class hierarchy. The root (base class) is an abstract class Collection which has 3 concrete descendants: Set, List and Que...
[2 replies] Last: how are these descendants (Set, List, Queue) different from each other... (by gunnerfunner)
by mgala
Function in program not printing out a list of arrays when being called
 
Hello, I'm writing a program which saves 'reservations' of sports and is navigated via a simple text menu that is printed each iteration of the program. It prin...
[3 replies] Last: Thanks for all the help! Unfortunately I'm not allowed to use structs ... (by mgala)
Stack vs. Queue Linked Lists
 
Hello, I'm curious as to whether or not I'm implementing queue structure correctly or not. The commented out block was my stack structure code before I changed...
[3 replies] Last: such a method and that should be const qualified The operative word ... (by gunnerfunner)
Help with arrays in functions
 
Hey all, so for my CS class we were given the following code, i can read ans understand what part is doing what in it, but we are supposed to "add code to imple...
[1 reply] : OK so you have your function prototype their bool search(int arr , in... (by joe864864)
Prime Nnumbers and Genterating memory
 
The program needs to get all the prime numbers from a random generated array of 50,000 integers, Take all the prime numbers out and put them in another array fi...
[11 replies] Last: @Raynieri Sorry for not addressing your question about junk values. I... (by closed account 48T7M4Gy)
Recompilation - classes
 
I was wondering Why must all the clients of a particular C++ class be re-compiled when the storage structure of that class’ data members has changed?
[5 replies] Last: makes sense, that's what I meant to say when I said bar is not defined... (by muhammad k)
For Loop to calculate PI
 
Im trying to calculate the value of PI by using George's Series or the Leibniz Formula which is the sum of several values which alternate in adding and subtract...
[8 replies] Last: 3.313759 is correct for the 500th iteration. [quote=wikipedia]Leibni... (by AbstractionAnon)
How to use member functions declared in header and source files in the main method.
 
I'm writing a program to translate morse code and I have it working perfectly but I need it to be spread across multiple files with a header and two source file...
[8 replies] Last: A member of a class can access other members of the same class. class... (by keskiverto)
Convert a vector of unsigned characters to an IEEE 754 float
 
Hello. I have binary data represented as a vector of unsigned characters. I need to convert it to a IEEE 754 float. Using this source (http://www.technical-r...
[3 replies] Last: OK. Solved using: finalResult = reinterpret_cast<float&>(hexNumber);... (by igorland)
array
 
How to display elements of the array is equal to the sum of 15? Example 69 const int n = 10; int a = { 19, 32, 69, -44, 5, 63, -7, 8, -29, 906 }; ...
[2 replies] Last: If the OP is trying to get the sum of the digits of each element (slop... (by closed account E0p9LyTq)
C++ vector coding
 
I have been asked to create a program that needs to read sales values from a sales text file and therefore will output a bar chart representing these values to ...
[10 replies] Last: yeah the program is running good! Sorry what do you mean by remove... (by gunnerfunner)
by Mahmgl
Need help with assignment
 
Hi guys! I had this assignment which asks to calculate the average of numbers divisible by 5 in a range entered by the user. I have solved it and all, but th...
[3 replies] Last: If there are no numbers, then there is no sum and no average. You can ... (by keskiverto)
80 percent done.. Stuck on the last 20%
 
Menu: 1.Insert "Insert" key 2.Delete "Delete" key 3.Sort "F2" key 4.Select "Down Arrow" key 5.Move Right "Right Arrow" key 6.Move Left "Left Arrow" key ...
[5 replies] Last: Thank you. I just completed the program. (by dton626)
Email Parser
 
I have been trying to debug this program but its really given me a nightmare, i will appreciate if you guys can look and advise what i am doing wrong. the pr...
[2 replies] Last: Your program to check if an email id exists is unnecessarily complicat... (by gunnerfunner)
December 2016 Pages: 1... 1112131415... 28
  Archived months: [nov2016] [jan2017]

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