Beginners - February 2018 (Page 16)

program always outputs "question mark box" to console
 
Hi guys Im not quite sure what is going on here, i've tried google but to no avail, maybe im just not searching right. But i've made a little program to print...
[2 replies] Last: Peter87, thanks mate. Worked like a charm :D (by Dillerfar)
by libi
Restarting/simplifying, data into 2d array
 
I have this file, that reads something like: tom doe,35, 68, 99, Jane doe,24, 55, 96, ben doe, 46, 73, 94, Sussie doe, 23, 56, 77, Now I read the values in...
[1 reply] : Does each line have the same amount of scores? Also, I do suggest usin... (by Ganado)
by JBkane
For loop extra increment
 
I can't wrap my head around why this code comes out to 13, as far as I can tell it should be 12. int i, t ; for (i = 0; i < 5; i++) t = 2 * i; i = 0; for ...
[3 replies] Last: Sometimes I wonder what is going on in the heads of people who provide... (by Duthomhas)
by JZam
Reading from a file and storing it in arrays
 
Essentially, I have an assignment where I must read from a file and store the data from the file into an array and a 2D array. The file says this: John Smith,...
[3 replies] Last: So the for loop is before the while isn't needed? I'm still not exactl... (by JZam)
I am in need with some help please
 
Hello, This may seem like a simple easy fix, however I am not able to figure it out currently. I am new to coding and this is one of the first I have tried ...
[3 replies] Last: Thank you for explaining each step JLBorges, and thank you for explain... (by DarkxAngelx)
I NEED HELP ASAP!!!!!!!!
 
Hi, im having trouble debugging my menu driven program that involves primarily functions, but also includes loops, switch, and if statements. Heres my error ...
[3 replies] Last: Tags. Yes. See http://www.cplusplus.com/articles/jEywvCM9/ (by keskiverto)
Need guidance in menu based football game
 
Write your question here. So i wanted to make a Hand football game in c++ the game works as such: the ball starts with the player . The player has to input ...
[no replies]
Accessing class variable from another class
 
I'm looking for how to create a variable in each of two classes, with these properties: 1) Variables have the same name. 2) Each variable is per-class (i.e....
[1 reply] : You essentially have it. Just use the valid syntax: http://en.cpprefer... (by keskiverto)
explain code Please
 
Hi, I'm having a hard time as to understand why the answer for b is 4 and for c is 3. Any clarifying comments will be highly appreciated. #include <iostr...
[1 reply] : Okay. So let's start with functions explanation. fun1 gets int argume... (by DonRumata)
String Helpers
 
1. The output from the character trim is not what was expected. Expected: "this % needs a lot\rof trimming" but got "of trimmings a lot" Similarly, trimleft...
[2 replies] Last: The "trim" functions did what it was supposed to. It is when printing... (by phztfte1)
Any help on this C++ program?
 
#include <stdio.h> int main() { int grade = 76; //variable declaration and initialization if grade >=60); //decisional statement { pri...
[1 reply] : Hello coco2991, PLEASE ALWAYS USE CODE TAGS (the <> formatting button... (by Handy Andy)
no class template named ‘rebind’ in ‘struct aligned_allocator<short int>
 
Hi I am new to vectors in cpp, when I compiled the below code I get this following error. What does this mean and what the code is doing ?? template <typena...
[2 replies] Last: With C++11 or later: a user defined rebind is not required; in fact it... (by JLBorges)
C++ program errors, cant fix, help?
 
#include <stdio.h> int main() { double PI = 3.14; //variable declaration double radius; double area; printf("Enter radius: "); //prompt area = PI * radius *...
[1 reply] : C++ program: #include <iostream> int main() { const double PI =... (by JLBorges)
getting errors, anyone tell me why?
 
#include <stdio.h> int main() { int count = 2; //variable declaration and initialization while (count > 0) //looping structure { printf("continue\...
[1 reply] : First of all, please use code-tags, it makes code easier to read. :-) ... (by Misenna)
Date as a string to date float
 
How can i do this the date format is 12/15/2015
[4 replies] Last: #include <iostream> #include <string> #include <sstream> int date_to... (by JLBorges)
random generator
 
I keep getting the same output and im not sure why since it should be a random value everytime i enter 'r'. srand(time(0)); int x; char d; ...
[8 replies] Last: its probably confusing without the code. #include<iostream> #include... (by fivestar)
by Carat1
name in textbox help
 
hello i'm trying to make a name grabber for a game. the name is supposed to show in the textbox once the game is open. i am able to make the amount of money i h...
[8 replies] Last: std::string model(lib->getIGN()); String^ MyString = gcnew Strin... (by Carat1)
Sum of a line of integers
 
Hey everyone, just started C++ this semester and loving it. Just came across a problem though than i am unsure of where to start. To begin, the program is supp...
[3 replies] Last: @ icy1 No, you are asking the user to do extra, weird input to supp... (by Duthomhas)
quit program when character q is entered
 
Hello, I am trying to exit the program if the character 'q' is entered into input. I am expecting an integer value for input. I am confused on the best way to g...
[6 replies] Last: I don't really know how to go about this. so if the user enters 's', h... (by tdleanz)
Help With UDINT To STRING
 
Hi, I have the following code that should take a UDINT data and change to a STRING output but I get an error " Subscripted value is neither array nor pointer...
[1 reply] : Hello thebig1, PLEASE ALWAYS USE CODE TAGS (the <> formatting button)... (by Handy Andy)
February 2018 Pages: 1... 1415161718... 28
  Archived months: [jan2018] [mar2018]

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