Beginners - November 2016 (Page 20)

Trying to get numbers from text file
 
Hey! I'm trying to get a matrix that is written in a text file (.txt) into a 2 dimensional massif. I've beed trying to find a way but all I got are not respond...
[8 replies] Last: Sorry, it took me longer than I'd expected to get back to you #incl... (by gunnerfunner)
how to call?
 
Hi. I made my code but now I do not know how I am to call the functions? I will attach my code. The code should call the last two functions and display the size...
[1 reply] : just pass the name of the array: getData(celine); printArrays... (by ne555)
'+=': function as left operand error
 
Im trying to make a operator overload for '+=' where I will use it to add a int value to a class called "player" to its private int "points". I'm new to this ki...
[4 replies] Last: oh my god, IT ACTUALLY WORKS! :D thank you A LOT stranger, now I can f... (by robinlo)
if else with else if
 
So, I know some of the rest of the code is probably wrong, but my current issue is that whenever i compile it returns: "expected primary-expression before 'e...
[2 replies] Last: This condition is not going to work as intended: if (60 <= Pressure <... (by Chervil)
if else loops
 
So, I know some of the rest of the code is probably wrong, but my current issue is that whenever i compile it returns: "expected primary-expression before 'e...
[1 reply] : please do not double post, you waste my time. http://www.cplusplus.co... (by SamuelAdams)
by rlake
Function to delete item from hashtable not deleting
 
Hello, I have a hashtable that has chaining using a linked list. I am trying to write a function that will delete an item from the hashtable, but when it ru...
[11 replies] Last: I see now what I was missing. Thank you very much! (by rlake)
Help me properly nest while loops.
 
I need help to clean up my code. How can I combine my while loops by nesting? I was trying around and experimenting but I kept running into infinite loop issues...
[1 reply] : You have used too many while loops. It is not required to use as much ... (by fantomasAlbania)
Pirnting numbers in rows to columns?
 
Hello, im trying to run a program that shows numbers in columns, i have been able to run the program in rows but i cant find a way to make it run in columns. ...
[1 reply] : Simply change cout<<M <<" "; to cout<<M <<" "; ... (by Arslan7041)
Starter here!
 
Hello!I am a starter in C++ and I want to become better in programming since I see my future in this,kind of.So all I know for now is to make a basic computer,e...
[1 reply] : There are some suggestions for beginner projects in an article on this... (by wildblue)
couple of errors
 
Hi guys, I am writing a code to add two movies give them ratings (i.e. 1-5) and their rating (i.e. G, PG, PG-13, R) and output the average rating and rated of t...
[2 replies] Last: Line 26,27: You're declaring these functions as global, but you have ... (by AbstractionAnon)
SFML time problem
 
I am learning to create classes and while making a class to help me draw a nice tree, the "Time" functions of SFML gave me a wonky error. here is my code: ...
[3 replies] Last: sf::Time has two constructors that are not private and those are the... (by cire)
max_element and template[Help]
 
I do not know why it's is not working, is it my function, is it my template. #include<iostream> #include<cstring> #include<algorithm> using namespace st...
[2 replies] Last: Awsome, thank you so much now it works perfectly. (by raynierl)
by osur
Linked List with class-type data
 
Hello friends, As the title suggests, I am trying to make a simple linked list that has a class data type. An issue arises when I try to create the pointers nee...
[1 reply] : Again, from what I gather I assume the 'new' on line 100 is giving me... (by MikeyBoy)
Pointers and C-Strings
 
Hello everyone! Well I, McClapYourHands, am utterly confused. I am working on a class project that is relating C-strings and pointers. Part of the proble...
[1 reply] : Line 11: STRINGSIZE is an uninitialized variable. Line 12: This arr... (by AbstractionAnon)
Color Palette?
 
I am trying to create a reusable color palette. What I have so far doesn't show any errors until runtime. Here is what I have: struct COLORPALETTE { stati...
[4 replies] Last: Thanks, this works. In another header (loaded before these colors) I ... (by cire)
Template functions
 
This does not even compile and I cannot figure out why. It's got quite a list of errors for being such a small peice of code... "Illegal use of type T as exp...
[3 replies] Last: First time learning/tying to use Templates, can you tell? Thanks so mu... (by Culbrelai)
Battleship game help
 
The assignment is to make a battle ship game. I Must use two 2D arrays to act as each player’s board. The user must be able to choose their difficulty level...
[2 replies] Last: Pseudo code: Initialize boards Get User 1 name Get User 2 name ... (by koothkeeper)
Replace
 
I'm writing a code that replaces the word read with the word study. So for the first sentence the correct answer will be I'm studying. The assignment requires t...
[4 replies] Last: Tried with while and for aswell but it didn't work. (by markusfurst)
How do I put in a yes or no input statement?
 
How do I put in a yes or no input statement? Yes for the program to run and no for the program to stop. I also need a yes or no input at the end of the program ...
[2 replies] Last: Asking yes or no before and after iterations: #include <iostream> #... (by boost lexical cast)
by krutuk
rvalue is not destroyed
 
Hi guys, I though that after function call all rvalue parameters send to function will be destroyed. I'm completely messed up with this example. Can someone he...
[2 replies] Last: only string literals have static storage duration, see http://en.cppre... (by LukeShen)
November 2016 Pages: 1... 1819202122... 44
  Archived months: [oct2016] [dec2016]

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