Beginners - January 2018 (Page 4)

by kada17
Having trouble with looping over two const char*
 
I have a function that finds the difference between two characters that are in a null terminated array. Here's the function: int diff(const char* c1, const ...
[13 replies] Last: Those are just examples that you can then apply. Show us your main fun... (by Ganado)
by sambix
My program isn't opening my file?
 
I'm sure that i have the correct file name. The output I'm getting is "Cannot open file". What am I doing wrong? #include "stdafx.h" #include <iostream> ...
[2 replies] Last: For this to work, the file "data.txt" has to be in the working directo... (by Repeater)
Polymorphism
 
hi guys so this is a pretty basic question which I probably should know by now but I'm going to bite the bullet and ask it anyway So the question is how come l...
[3 replies] Last: thanks guys that makes a lot of sense now :) (by adam2016)
Duration Calculator
 
I have been trying to write a duration calculator and I cant get the one's place value or the correct tens place value, please help? //Structures //James...
[9 replies] Last: Hello RegalCppNewb, In keeping more with your code here is another wa... (by Handy Andy)
by ZekDe
Common variables
 
hi friends, I amusing Qt Creature and I have two form ,this two form must use common variables that I must access these variables.I will get a value from outsi...
[2 replies] Last: It’s hard to give a complete answer with so little information. You ... (by Enoizat)
Buttons
 
I am making a windows application and i can't find a way to destroy a button by pressing another button and to close the program by pressing the button. Than...
[6 replies] Last: Unfortunately i don't have the money to buy the books but i will take ... (by niksacokica)
by cle
homework
 
Hello! I have to write a program that outputs a text vertically. I have a print_all function specified and may not change this. The issue must look like ...
[1 reply] : What actually is your problem ? To see how the print_all function work... (by Thomas1965)
General Variable
 
Hello, I was wondering if there can be a general type of variable in c++, that if the input, for example, is int, that variable will become an int.
[7 replies] Last: Maybe auto is what you're looking for? See: http://en.cppreference.c... (by JustAMan)
by mt280
Basic Blackjack Game
 
This is a basic blackjack game. It is stuck saying that I can't have else statements without an if, but I have an if. Also, it still delivers another card even ...
[3 replies] Last: Why don't you check response after line 42 before you add num4 to num3... (by Thomas1965)
File Types
 
I was wondering how the .h and .cc files work together. I am trying to make a program that uses the two files but I can figure out what I would use each file fo...
[2 replies] Last: Thanks so much. That helps a lot! (by IIAnicII)
best way to print a text menu
 
I am writing a console application and I want to have menus that the user navigates through via getch() (so none of the "press 1 for this, 2 for that" nonsense)...
[no replies]
C++ RPS
 
this is for a rock paper scissors game Function format we must use >> bool isRoundWinner(char move, char opponent_move); What should the function above look...
[2 replies] Last: http://www.cplusplus.com/forum/general/229299/ (by chicofeo)
by masony
classes, data, member function and objects
 
Hi, just list down which one is classes,data,members function,and object no coding required. I just want to confirm my answer. Observe the following program ...
[5 replies] Last: thank you all! (by masony)
help home work
 
Request Complete the following program so that the long-long Fibrek (long long n) function recalculates the value of the nth Fibonacci number. #include <iostr...
[1 reply] : Here is an example: int i1 = 1, i2 = 1; while (i1 < 200) { int tem... (by rjphares)
int main(int argc, char *argv[])
 
The program below does not allow me to enter argv. it goes directly to line 58. How come? // Terminating iterations over ranges with iterator sentinals //...
[10 replies] Last: Thanks Ganado and helios. Doing the compiling and linking from the ID... (by phztfte1)
Skipping cin statements
 
I am new to C++ and don't know too much yet. I need an input for every cin statement. I am only able to choose a gender. After that, it prints the rest cout sta...
[2 replies] Last: I changed gender to a char because an Int is a whole number. a char is... (by Kevin211)
basic input and output problem
 
I am new to c++, I just start to learn programming from yesterday, and I already stuck at a very simple task. I want to write a program to read a single word ...
[2 replies] Last: oh, I understand now, thank you very much! (by astropolaris)
Char variables
 
is it possible to have someone enter two letters on same line and have those two characters stored as seperate char variables while only having initialized two ...
[2 replies] Last: Thank you thats exactly what i meant. (by fivestar)
Creating Prime Factorization Class
 
I'm trying to add the numbers that are both factors and prime into a list, but I keep getting an error at the given lines so if anyone can give me tips on how t...
[no replies]
Dynamic allocation in function not accessible outside
 
I need multiple multi-dimensional arrays to be dynamically allocated in a function. The required size is determined inside the function and their values are the...
[3 replies] Last: > would you mind explaining why the first option isn't exception safe ... (by JLBorges)
January 2018 Pages: 123456... 22
  Archived months: [dec2017] [feb2018]

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