Beginners - February 2019 (Page 15)

by kanken
Guess It Right
 
is it mandatory to make a guess in the last move?
Feb 13, 2019 at 6:27am
[2 replies] Last: in third test case in second chance if we guess instead of remove box ... (by rickey1498)
Using a recursive function to print array backwards
 
Im currently attempting to write some code that converts a decimal number into binary and the use a recursive function to print the contents of an array backwar...
Feb 13, 2019 at 1:37am
[1 reply] : Your output is correct. 4 is "100" in binary. You can have any numb... (by Duthomhas)
by vysero
pointers and const
 
I am confused by this variable: const char *const amplifierGPIO = "/sys/class/gpio/gpio107/value"; What does it mean to have *const? Is amplifierGPIO a poin...
Feb 12, 2019 at 10:52pm
[3 replies] Last: It doesn't matter in which order you put the words that are on the rig... (by Peter87)
Is there a list of already used varible name
 
I love using the for loop , for (int I_1 = 0; I < a; I++) and I even name the varibles with I_1, I_2, I_3 so I only need to check the last varible to name the ...
Feb 12, 2019 at 9:50pm
[10 replies] Last: @jonnin, Peter87 and lastchance, Thanks for the input. Back in the d... (by Handy Andy)
Debug Visual Studio 2107 C++ program error
 
Can't get VS to compile simple hello world. Project created as desktop folder Demo1(Desktop\c++\demo1\demo.cpp Code: #include <iostream> using namespa...
Feb 12, 2019 at 9:38pm
[3 replies] Last: Hello max4949, I tried to duplicate your problem, alas could not. Yo... (by Handy Andy)
For loop runs once and ends program prematurely.
 
Hey all, this is my first post on this forum so if i'm writing this question wrong or something simple please let me know! Basically i am writing a code for an ...
Feb 12, 2019 at 7:43pm
[4 replies] Last: imax=(maxTL-10)/8; maxTL is read from the user. what did you type in... (by jonnin)
by vysero
Reading GPIO value using ofstream
 
I would like to know if it is possible to read a GPIO value using ofstream. Or maybe I wouldn't have to use ofstream? I know how to set a GPIO value: const ch...
Feb 12, 2019 at 6:49pm
[2 replies] Last: @Ganado Ah I see, awesome thank you! (by vysero)
by obeeey
Prime numbers - fermat's theorem
 
Hi ;) I wanted to write a program which would tell "YES" if an input number was prime, and "NO" if it wasn't. Fermat’s Little Theorem: If n is a prime num...
Feb 12, 2019 at 5:36pm
[7 replies] Last: Another advantage of using "repeated multiply ... modulo p" over the p... (by lastchance)
need help interpreting error message
 
Microsoft must have held an internal contest to see how difficult they could make an error message to decipher. I'm getting this message, and it's not helpful....
Feb 12, 2019 at 4:16pm
[3 replies] Last: Hello Daveburton, One thing I have found with the VS error messages a... (by Handy Andy)
Please help me
 
studentCJ (1) Hi I am doing the RECURSIVELY FINDING PATHS THROUGH A MAZE project but I got a problem here. I try to read a file to a 2D char array but it...
Feb 12, 2019 at 3:58pm
[7 replies] Last: Like I said, use getline() to read the maze data. #include <fstream> ... (by dhayden)
Reading file into 2D char array error.
 
I have a file that contains several records of the same size, all in order. I am able to read in the data into a single char array multiple times, but cannot se...
Feb 12, 2019 at 3:41pm
[2 replies] Last: Thanks, that fixed the problem! I forgot about overloading the stack l... (by closed account Ezyq4iN6)
Problems with Pointers
 
In my code I'm trying to change the ship object variable into a pointer variable. The ship variable in main originally looked like the asteroid variable above i...
Feb 12, 2019 at 3:20pm
[7 replies] Last: And don't forget 'delete' after Actually I would prefer the use of s... (by jlb)
Delete
 
Delete
Feb 12, 2019 at 3:11pm
[3 replies] Last: std::stoi() might throw. Here some hints: #include <cstdlib> #inc... (by Enoizat)
by Horror
I don't know what to do.
 
My teacher assigned the class a lab, and I don't know what to do. To be more specific, I don't how to setup the calculation formula. The instructions are: Prob...
Feb 12, 2019 at 12:12pm
[6 replies] Last: Hello Horror, Yes except that you lines are out of order. You need to... (by Handy Andy)
error: invalid types ‘unsigned int[unsigned int]’ for array subscript
 
Why am I getting invalid type on Project1.cpp:139:32: error: invalid types ‘unsigned int[unsigned int]’ for array subscript os << Mon[month(da...
Feb 12, 2019 at 11:01am
[6 replies] Last: Hello thishas, Reefer to post http://www.cplusplus.com/forum/beginner... (by Handy Andy)
My program keep showing me the message 1951951802
 
my problem was to slove the ecuation (a+b+c)/(a+c)-(1/a) and my code is #include <iostream> using namespace std; int main() { int a, b, c, ex; co...
Feb 12, 2019 at 9:21am
[3 replies] Last: else ex==((a+b+c)/(a+c))-(1/a); should be else ex=(... (by lastchance)
Search word in more than one text file
 
Hi, is anyone know how to search two text file and the output will be - show which text file - line number - the word itself currently what i did is i nee...
Feb 12, 2019 at 8:34am
[1 reply] : In other words, you are writing a simple variant of findstr | grep. ht... (by keskiverto)
Recursive maze solving
 
Hi, I finished my code but the output result does not look right. I can not find my problem, Can anyone help me? #include <fstream> #include <iostrea...
Feb 12, 2019 at 7:22am
[3 replies] Last: Hi, sorry for not clear words. The program should output the path but ... (by studentCJ)
Extract multiple text file in one program
 
Hi, is it possible if i want to extract multiple text file in one program and append it to the existing text file? Here, i only know to read one file, i want it...
Feb 12, 2019 at 5:08am
[11 replies] Last: here my code is. Okay the instruction is 1) I need to extract the tex... (by closed account iN8poG1T)
by libi
templates
 
Having some frustration here, attempting to define a templated function that accepts multiple data types, but Im doing something wrong with the template. Any he...
Feb 12, 2019 at 4:02am
[1 reply] : Well since most of the problems are not template related I suggest you... (by jlb)
February 2019 Pages: 1... 1314151617... 23
  Archived months: [jan2019] [mar2019]

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