Beginners - November 2018 (Page 20)

Help me with my game command please :<
 
I'm currently adding a new feature "/msg" to a game that I'm modifying. The command works like "/msg name message". However, I'm having issue to identify which ...
[7 replies] Last: Here's a method that doesn't care about whitespace between "/msg" and ... (by Ganado)
Vertical bar graph
 
Write a program that accepts a list of up to 40 non-negative integers and displays a vertical bar graph of those values. Number of values to graph: 5 8 4 6 ...
[1 reply] : Perhaps a newline at the end of a line? (by keskiverto)
Memory address size (1,2)
 
So yeah this is a bit of a humiliating question to ask considering I am a computer science student but nonetheless, how big are memory addresses? I know that...
[27 replies] Last: thanks guys for sticking with me :) I think my wording of the questio... (by adam2016)
double value within union corrupts int value
 
Sorry - I'm sure this is very basic to someone who codes in C++. I'm auditing an ETX self paced course for intro to C++. I ran across this in a question about...
[7 replies] Last: you should not need a union in anything you write. You just need to k... (by jonnin)
How to make a two dimensional array with rows and collums selected by the user?
 
So I have this problem with arrays. I have to make a program that makes the user input two numbers - one for the number of rows, and one for the columns in a 2d...
[3 replies] Last: #include <iostream> #include <vector> #include <ctime> #include <cstd... (by lastchance)
Which data structure / class should I use?
 
Hello guys, I would like to kindly ask for an advice. I have a function that will output two parameters: uint8_t *data; int size; I want to store th...
[7 replies] Last: @keskiverto Yes, it was for example. Ok, thanks so vector is the way... (by Unspoken)
help needed
 
Raja only participates in contests and does not upsolve, but he claims that he has been upsolving. Chef wants to test if he is really improving, so he asks Raja...
[8 replies] Last: whats the logic behind vector pair in CHHAPPY @yoyohoney (by closed account 4Nybko23)
by az1234
Reading in only every other line from a file
 
Hi, I've been trying to figure out how to cout the even lines from a file into one array and the odd lines from the file into another array. I've tried a few th...
[7 replies] Last: #include <iostream> #include <fstream> #include <string> #include <ca... (by lastchance)
by ashwyn
Help with float validation
 
Hello. I'm writing a program and I need it to accept input from the user in main, and then call a function that will validate that input as a legal float data...
[5 replies] Last: and then call a function that will validate that input as a legal flo... (by lastchance)
Detecting the end of line in a text file (1,2)
 
I need to read 4 variables from a text file but sometimes the line could have less than 4 values to read from. I need to be able to detect if a line has ended a...
[27 replies] Last: Excellent! (by tpb)
Help reading data from text file properly.
 
This portion of my code i can't get to work. The text file looks like this: Vanilla 3 Chocolate 9 Chocolate 8 Vanilla 7 Chocolate 6 Lemon 5 It...
[2 replies] Last: You might be able to just do this: while (i < size && in >> flavor ... (by tpb)
Recursive function
 
I need to make a palindrome checker with a recursive function that is of type bool and has the parameters of string to be checked and int size of the string. I ...
[3 replies] Last: The last snippet should work. Change return (check == check[size-1]... (by Satan)
Looping-Proper Iterations and Initializing/Storing Variables
 
Hi!! This is my first time posting and I'm not sure how much help I'll be able to get here because I can't post my code per my college's plagiarism policy. I am...
[3 replies] Last: Sorry-I've been staring at it for far too long. @tpb, it is a for loop... (by newtothis123)
by DeeJ27
Nesting Loop Statements - Need guidance
 
Disclaimer - this is a homework assignment. The professor doesn't teach in a manner that I am able to comprehend so am asking for guidance. I have researched an...
[3 replies] Last: Oh I get it! The else statement is the "answer" if the if statement is... (by DeeJ27)
Help on Passing by Value/Reference
 
My class partner and I are having trouble with passing by reference and/ or passing by values. We decided to put our variables in global and the code works perf...
[4 replies] Last: I'm way too tired to go into detail right now but there is plenty of g... (by adam2016)
getting average of an array(pointers)
 
I need your assistance please, my code for average is giving me a negative average and instead of positive (pointers), what am i doing wrong int main() {...
[1 reply] : You are doing cin Into array size after you allocate. there are a fe... (by user42)
Recursive functions
 
Why do I keep getting a segmentation fault? int main() { int x; cout << "Enter a number greater than or equal to 0: "; cin >> x; ...
[4 replies] Last: #include <iostream> int f(int n) { if (n == 0) return 5... (by tpb)
by darego
Linked list, delete node at x position
 
Hi guys, I am working on a linked list to try and understand them a bit better. I currently have a function to insert a node into the list, display the list an...
[7 replies] Last: Thanks a lot Repeater! You've been very helpful again.. code below wor... (by darego)
homework help
 
I'm doing this assignment for my Java class but each time I run the program I get a error. This is the problem. CODE A PROGRAM THAT PROVIDES THE NUMBER OF TEXT...
[1 reply] : CODE A PROGRAM THAT PROVIDES THE NUMBER OF TEXT MESSAGES A USER SENT ... (by adam2016)
November 2018 Pages: 1... 1819202122... 24
  Archived months: [oct2018] [dec2018]

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