Beginners - December 2012 (Page 31)

by htown
Array error
 
I'm getting this error: no match for operator [ ] in my first function. Could anyone point out how to fix it? struct arraylist { public: bool isempty...
[2 replies] Last: list = new int ; changing this line solved it. (by htown)
Help!
 
I have been working on this for 3 days now and I can not get the desired output, here is what I want the output to look like: Tree No. Species Descriptio...
[4 replies] Last: Yea, after taking a long break from this code, I realized it was my re... (by GoPredsGo)
Trying to finish this game
 
Hi everyone, I've been working on this game where you are placed into a location in a matrix, and you need to go up, down, left, or right to get to the solution...
[3 replies] Last: It now compiles okay, but the winner() only triggers when I go to 3,2 ... (by Hoggmeiser)
by ags792
Can't Figure Out Encode and Decode C++ Problem
 
I'm having some trouble figuring out a C++ problem in my book. This is the part I really don't understand: "Note that what you encode cannot be directly decoded...
[15 replies] Last: ? (by ags792)
Get cursor x and y values using RAWINPUT
 
I need to use RAWINPUT instead of GetCursorPos because I am trying to get the x and y values while in a game. If I use GetCursorPos, the x and y values will con...
[1 reply] : Help please :< I have been working on it constantly but I can only ge... (by chrondog)
problem with my code
 
here is my code, when I run it it wont calculate the average. Also I dont know how to make the average and length have only 4 digits after the decimal. thanks ...
[2 replies] Last: Thank you! (by farooroo)
Code optimization (for a competition)
 
Hi, can we optimize more this code? #include<stdio.h> main(){int n,i;scanf("%i",&n);while(n--){scanf("%i",&i);printf("%d\n",(i+1)*i/2);}} Thanks....
[3 replies] Last: Write it in J (by ResidentBiscuit)
Which graphics library?
 
I have 2 years learning C++ and I have just scratched any of the graphics apis, only by their names. I was thinking of starting and using the knowledge for cr...
[7 replies] Last: I've played with both and do have to say the documentation in DirectX ... (by ResidentBiscuit)
Binary Search try
 
I cannot get my insert function to work for my binary search tree. Says i need to return a value i dont know what to return template <class DataType> void ...
[no replies]
Simple solution, major frustration
 
#include <iostream> #include <ctime> #include <string> #include <cstdlib> using namespace std; int main(){ //Variable declaration string name(" "); i...
[9 replies] Last: Just use if to tell it not to go above or bellow those numbers.... (by Forseth11)
abstract base class - private members?
 
Hey folks one question: if i make an abstract baseclass... then all the private members in that class is totally useless and unable to reach/modify or do ...
[1 reply] : Not if the abstract base class has public or protected member function... (by Peter87)
help please urgent
 
how can i fix this double *myarray = new double ; because i get lenght as an undeclare identifier please help thank you #include <iostream> #include <iom...
[7 replies] Last: +1 for Raezzor : Just learned something Lol I didn't see the mistake ... (by alistjazz)
why does cout give me 0 and not the contents of the file?
 
ifstream letterfile ("letters.txt"); cout << letterfile; theres a file filled with stuff but i just gets a 0 instead. my plan is to initialize lots of 2d...
[4 replies] Last: oh, k thanks. (by devonrevenge)
by dusty
Replacing an integer value with a blank space
 
If the number zero is acquired via ifstream, how can you replace it with a blank space? I've looked around the web and found related things but nothing that he...
[5 replies] Last: while (!inFile.eof()) { int tf = 0; cnt++; avg... (by dusty)
SDL_Surface not going where I place it on screen...
 
So I tried making a simple program that has a button on screen and when the user hovers there mouse over the button it will change color... I put the button loc...
[2 replies] Last: ty! lol (by Wil Prim)
code please_12/10/2012
 
// Devleop a C++ program that will determine if a department store customer has exceeded the crdit limit on a charge account // For each customer, the following...
[2 replies] Last: #include <iostream> using namespace std; int main() { int accountN... (by dipen45)
HALP!
 
How do I make it so if the person has 2 or less absences, it adds 2 points to their average? Help! #include <iostream> #include <ctime> #include <fstream...
[1 reply] : I assume this is copy pasta'd code? Why is absence a string? Maybe hav... (by ResidentBiscuit)
How to add a second player for trivia game.
 
I have my code complete, it works and everything, and I find out it has to have two players. Stupid as this sounds..I'm not sure how to do that..I mean I've tri...
[no replies]
Sorting Help
 
I need to take my code here and in the output report sort it so its the people with the highest averages at the top and the people with the lowest averages at t...
[3 replies] Last: Not sure why you'd name the two overloaded operators as friend functio... (by Raezzor)
Convert inches to feet?
 
Hi i am wondering how to convert inches to feet from the user input? i am doing overload programs with main.cpp, distance.h and distance.cpp. here is my code d...
[4 replies] Last: If it's not an actual member function then the only thing that it woul... (by Raezzor)
December 2012 Pages: 1... 2930313233... 65
  Archived months: [nov2012] [jan2013]

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