Beginners - November 2017 (Page 5)

c plus plus strings for loops and if statements.
 
I am working on a project where you make a txt file and you are suppose to print out 10 lines. If one line is empty it is also suppose to be printed out and cou...
[2 replies] Last: Hello Jaggy1997, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
Number Sort (1,2)
 
I'm not really sure how to fix this, and I'm also not sure how to add a section that counts how many times the numbers are compared in each function. #inc...
[36 replies] Last: Hello Spiderman30, First I will apologize for defining the original a... (by Handy Andy)
graphics.h
 
How can i link graphics.h to visual studio 2017?
[1 reply] : You can't since it's not part of VS. Maybe you can try https://githu... (by Thomas1965)
Having trouble coming up with code for 30-day calendar grid in c++
 
Hello all, I am a beginner in c++ and started about 2 months ago. I am currently working on a project. The goal of my project is to write a program that when...
[1 reply] : had posted following program about a year ago, see if it helps: http:... (by gunnerfunner)
rock paper scissors with loop
 
How can I easily display what the computer chose and what the user chose in words? i.e. rock paper or scissors. I am thinking an if-else statement but is there ...
[1 reply] : Instead of if-else statements you can use a lookup table. Maybe you wa... (by Thomas1965)
help with ofstream
 
Hi all! I have been trying to correctly run the program since yesterday evening but still no progress yet. My problem is actually related to the stream output o...
[9 replies] Last: What is intriguing is reversing return values of sortcheck() . Thi... (by Chervil)
assigning values from vector elements to a string
 
Hi big rookie here. Im currently tasked with making a wordsearch solving program. The user is to enter the grid of letters string by string. The board is to ...
[1 reply] : On the main diagonal j=i. On any other diagonal j is a linear function... (by lastchance)
if/else and switch
 
trying to make a fun little random selection program for family game night. I want to use 2 choices: flip a coin and roll a die if 1 is chosen, the program says...
[14 replies] Last: The coinToss() and dieRoll() functions can be called from within the s... (by EtDecius)
Program just gives a black screen
 
I am having trouble getting the program to do anything. I know it will not run here because of ncurses, but it does compile. when I run the program, a black s...
[2 replies] Last: The problem I think is with my function calls (maybe the Fill() funct... (by cire)
input check help
 
New to c++, i'm sure that will be obvious when you look at my code. Writing a Tic Tac Toe program for a class. I would like to check input for each user in my...
[5 replies] Last: Try this, I changed you for loop to a while loop and changed the way y... (by jrw)
Feed back on using Functions
 
I want to get some feedback on your thoughts about passing values to a function that don't really "calculate" or are not "calculated" into the rest of the funct...
[1 reply] : Hi, Consider writing the functions using a bool argument. That way ... (by TheIdeasMan)
Polymorphism methods
 
class Shape { public: void draw() const {cout<<"draw shape"<<endl;} }; class Point : public Shape { public: Point( int a= 0, ...
[6 replies] Last: so long as the array type is Shape, will all methods called be from S... (by AbstractionAnon)
Payroll Program Time-and-a-half Struggle
 
I am pretty new to programming and am attempting to write my first program in one of my college classes. I have scoured the internet and I am not really sure wh...
[no replies]
Gaussian elimination
 
Hi guys, Ok so the excercise I'm having trouble with is a Gaussian Elimination. So I'm given a matrix and the vector in respectively 2 txt files: A.txt and ...
[5 replies] Last: I hope that you have been doing Gaussian elimination on a COPY of A a... (by lekfanda)
making real world applications
 
Hi guys so I have been doing the stuff such as reverse a string,find a palindrome,tic tac toe and other pretty trivial programs you can think of but my questio...
[2 replies] Last: With 2 years of study, you probably already know everything you need. ... (by mbozzi)
decltype question
 
I've copied this snippet of code from a new C++ book, "Learning C++ Functional Programming" by Anggorro. It doesn't compile though. #include <iostream> ...
[7 replies] Last: why do I have to initialise decltype((x->d)) d2 Because the type ... (by mbozzi)
by Delcho
Lenght of int type
 
Hello, can someone one tell me what is the easiest way to find the length of int type?
[11 replies] Last: I was close to posting this solution earlier. cout << ceil(log10(a ... (by Peter87)
Inheritance
 
Hello, i am hoping to get some help with the following code and the errors that i am getting. i have never written on here before and i am very new to C++. i h...
[1 reply] : Hello christjd, Welcome to the forum. PLEASE ALWAYS USE CODE TAGS (t... (by Handy Andy)
Linked List
 
I'm trying to set multiple islands that will each have a different population and for each person on an island, I need to be able to see their status. For exam...
[1 reply] : Similar to how you have the cin statement for prompting the user "How ... (by Ganado)
Issue with the output file of a read-in/replace-word code
 
In a nutshell: The code is supposed to open a file, read in the contents, search for a specific word and replace it (John to Replaced as shown in my code below)...
[5 replies] Last: gunnerfunner, your approach is sort of mind blowing. I haven't been co... (by meegsees)
November 2017 Pages: 1... 34567... 33
  Archived months: [oct2017] [dec2017]

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