Beginners - September 2017 (Page 17)

First program need help!
 
Hey everybody. New to programming here and specifically using c++. This is my first program and below I pasted the code I've written so far. If you could take...
[5 replies] Last: What is this: Double radius^ = 0.0 The trailing ^ looks like a ... (by Chervil)
Why can't I enter both number and sentence?
 
Hello! I searched for an answer for this everywhere but I couldn't find any. so my question is why my does my program take only one string sentence but takes ...
[2 replies] Last: I see thank you! (by stonedviper)
function error
 
Hello. I get an error in lines 5 and 33. I have forgotten much about functions, errors say : 1.'i' was not declared in this scope 2. expected ')' before ',' tok...
[5 replies] Last: What makes your code hard to manage is the first part: int main() { ... (by Enoizat)
Implementing Adjacency Matrix
 
SO I know what the adjacency matrix does, but I am stuck on how to implement to check to see if each nodes are an adjacent and return as true if they are in ter...
[no replies]
by ExtraY
Question about linked list
 
struct node{ node* next; int data; }; class List{ public: void addFront(){ node* temp = new node; ...
[6 replies] Last: head = temp means those two pointers have the same value which in this... (by closed account 48T7M4Gy)
by samcro
Grade Sum and Average Calculator: Console Application
 
Hi Everyone, I'm tasked with an assignment to build a program that calculates the average and sum of grades entered by a user. Instructions from the professor a...
[9 replies] Last: Thank you so much. Your code helped me immensely to clarify what I was... (by samcro)
by SasuKe
Read From Text File To An Object Array
 
Hi. I would like to know if there is a way to directly store contents from a text file to an object array. This is my code: This is the text file: ID lname fn...
[4 replies] Last: Thank you all :) Really appreciate it. (by SasuKe)
***Clean screen!***
 
Team, How to clean the console screen. cout << choose; cin >> choice; //Clean the screen. cout << new text, depending on choice.
[7 replies] Last: I used suyashsing234's example. I'm writing on Linux and Windows. Ex... (by shycas2008)
animation with sdl timeing/speed issue
 
Good Evening, i seem to be having an issue with my animations using SDL. the animations work, its basically just a static sprite swap, "Witch" for instance i...
[10 replies] Last: Glad it worked. It takes a while to get past hackery. Hackery isn'... (by jonnin)
Valgrind False Positive
 
Hi all, I have installed Bash on Ubuntu for Windows 10 and would like to be able to use Valgrind as well. However, upon running a simple hello world program ...
[2 replies] Last: I have a memory leak What's the error message? Please share the ou... (by mbozzi)
by Lithia
Increment Operators
 
Hello, I know that for ++i it increments before evaluating and that for i++ it increments after evaluating. However, I want to know why both for-loops output th...
[8 replies] Last: Not central to the discussion, but this may be of interest: C++ optim... (by JLBorges)
Using struct for the first time
 
I saw a task to... Input into a file personal data of n students, thier: Surname, name, age, Place of birth and telephone number. Output what the file contain...
[18 replies] Last: [quote=Enoizat]What do you want your struct/class do? [quote=Gieniusz... (by Enoizat)
Caesar Cipher Help needed (arrays and pointers)
 
I am a complete beginner with c++ and up to this point in school we have only learned and used Java. Our first project this year is to create a caesar cipher b...
[5 replies] Last: PS the (2) get methods would return the std_alphabet and the c_alphabe... (by closed account 48T7M4Gy)
by FoxFX
Hangman Program with String Arrays and Headers
 
I am trying to complete a simple Hangman game program which uses a Header that declares the two functions showGallows and showSolved. The main problem I have...
[3 replies] Last: If this is some sort of an assignment you were given and you are being... (by Uk Marine)
Reading a C-String From A File
 
How would I read words from a text file and store them in as a C-String? I know how to do it if we were allowed to store it in as a C++ string however we are no...
[1 reply] : See " Strings and null-terminated character sequences " on this page. ... (by Chervil)
Working with the big methods
 
I am working on this program, but I am hugely stuck. This is dealing with the big methods: normal constructor, lvalue copy constructor, lvalue operator=, and de...
[16 replies] Last: Hours must always be in the range 0 – 23 and minutes, 0 – 59, bot... (by dhayden)
Time
 
怎么写一个我爱你程序在某段时间执行?比如说5秒后执行。How do I write a program that I love you in a certain time? For example, after 5 ...
[8 replies] Last: :) No thank you, but feel free to ask more questions on the forum! (by Ganado)
get line function, strings and structs
 
I am trying to read a line from a file and store that line into a string. Once that line is stored into a string, I need to store it into a struct. #inc...
[4 replies] Last: Hello von1997, An alternative to Chervil's idea if your input is one ... (by Handy Andy)
2D array
 
I want to have a big enough 2D array without using dynamic variables. My system just can create array! while I need much bigger one, please help!
[9 replies] Last: Use static storage duration. #include <iostream> int main() { ... (by JLBorges)
Why it doesnt put the total? (8.9e+002)
 
My output is like: ___________________________________________________ Total (USD 51.36)...........................17 Total (PHP)...........................
[2 replies] Last: thanks to you! :> (by mayuki4846)
September 2017 Pages: 1... 1516171819... 21
  Archived months: [aug2017] [oct2017]

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