Beginners - December 2014 (Page 36)

i need help with SDL
 
im having a problem with getting my snake a vector on line 71 it said the no 'operator=' im trying to make it a vector so i can make it so the snake to grow...
[no replies]
calling function to read in array from a file
 
I am a bit confused on what the code for reading in an array from a file is. I keep getting error messages. Can anyone help by giving examples on the proper way...
[5 replies] Last: You are passing "n" by value, so "n" in main won't get changed. Try th... (by JayhawkZombie)
Need help!! why am i getting uninitialized local variable?
 
#include <iostream> #include <string> using namespace std; double mean (int grades , int userSize); int main () { const int size = 100; ...
[13 replies] Last: Well I found out why, I had copied a loop I made for an arbitrary ques... (by thinker85)
Error- request for member ' ' in ' ' which is of non-class type ' '
 
I keep getting the error "error: request for member 'firstname' in 'object2', which is of non-class type 'employee()'" I have searched other forums and i...
[6 replies] Last: Okay yeah that makes sense. the prompt I was given only included the "... (by brandona15)
question about pointers
 
I have to answer some questions that does not require me to write a program. I have some of it done, but I am not sure if it is correct and other parts have me ...
[2 replies] Last: Thanks for clearing up my answers and the hints for the next questions... (by Endymion)
How to add columns
 
How do I go about adding columns into this code that solely has rows included? Should be 4 rows and 4 columns. void gridSize(int rows, int col) { ...
[2 replies] Last: It's certainly closer to what I need than what I've got right now! Tha... (by lollipoppop)
Function Help (1,2)
 
So i posted a previous thread about mapping, I got that down. This is the background to my assignment: The rules of ESP are: There is a deck of 18 cards tha...
[28 replies] Last: By the way, passing i was the correct way right? Lol just want to doub... (by justinc978)
by Korcha
A little help debugging my sin(x) approximation
 
So I have written a Maclaurin series approx. for sin(x) and it works for values really close to 0 but for pi it outputs 0.787619 which is no where near sin(pi)...
[3 replies] Last: [(-1)^n/(2n + 1)!] * (x)^(2n+1) Maybe double check your parenthesis i... (by JayhawkZombie)
how to link GD library
 
OS Ubuntu 14.04 I am trying to run a basic C program using the GD library. The include line is #include <gd.h> I installed the tarball from https://bitbuck...
[1 reply] : nevermind forgot to link the name -lgd (by metulburr)
by rayna
Help with counting the number of characters in a file
 
I have this code that tells you the numbers of words in a file, number of lines, and each letter and how many times it was used. but I also need to know the num...
[2 replies] Last: where should i put that (by rayna)
Including implementation in header file
 
I am not entirely understanding the format of a header file. Why we need to include the implementation file at the end of a header file, and what does the chara...
[2 replies] Last: Don't need to include the implementation file at the bottom unless you... (by JayhawkZombie)
How to parse this data in c++?
 
Hello, I am doing a project where the user inputs the name of a file, (the format of the data for the file will always be the same), my instructor makes sure t...
[5 replies] Last: Okay I am going to use a debugger and see if i can figure out what is ... (by rustyrustyrusty)
Does a pure virtual function (that is defined in a derived class) have access to the private members of the base class?
 
I thought pure virtual functions have complete access to the private members of the base class, since the prototype of the function is declared in the base clas...
[3 replies] Last: Having a pure virtual method just means that the derived class MUST pr... (by JayhawkZombie)
How can I accept both int and char input?
 
I have a program where the user utilizes both char and int input at anytime. Is there a way to let the user input either of these, then act appropriately depend...
[8 replies] Last: Without templating, I'm unsure of any way to return an arbitrary type.... (by JayhawkZombie)
by rayna
Help with counting the number of characters in a file and the percentages of the numbers used
 
I have this code that tells you the numbers of words in a file, number of lines, and each letter and how many times it was used. but I also need to know the per...
[3 replies] Last: how do i find the total number of characters? The same way you find a... (by MiiNiPaa)
Memory Concentration Game Issues
 
I'm attempting to create a 4x4, 6x6 and 8x8 grid for my concentration game, but whenever the game compiles and runs it closes after making the initial selection...
[3 replies] Last: OK it's starting to look better, but now I have two new questions. 1)... (by lollipoppop)
by Z feng
Need help on this Quick Sort function
 
Hello all, I know there are tons of quickSort algorithm out there already, however, I tried couple of them, none of them gave me the correct result and I couldn...
[5 replies] Last: Yes, you can. (by MiiNiPaa)
inheritance
 
Hey hoping you guys can give me a push in the right direction. I can enter information up til position, after that the s system stops working cause of error. Ha...
[3 replies] Last: Check other functions, say, in name class (by MiiNiPaa)
SDL snake game I could use some help?
 
im having a hard time trying to find out how to make the snake grow after it eats the food? i will like any help thank you int main(int argc, char** argv) ...
[no replies]
Unable to match functions definition (1,2)
 
I have two errors that I am not sure how to fix, please let me know what I need to fix. Here are the errors: Error 1 error C2244: 'myVector<T>::at' : unable t...
[26 replies] Last: Welcome XD. (by closed account SECMoG1T)
December 2014 Pages: 1... 3435363738... 55
  Archived months: [nov2014] [jan2015]

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