Beginners - May 2014

by leo255
Need to create a queue of structs
 
Hello, I need to create a dynamically allocated, growable, queue of structs. I just need a little help getting started. From there, I know I can finish it on my...
[1 reply] : try this. http://www.sourcetricks.com/2008/07/c-queues.html (by Bdanielz)
by ryff
In Game Chat output colors.
 
A game i have played for years has recently become open source. it is coded in c++ and im having trouble. My problem is this.. In the game Chat output looks lik...
[no replies]
Function practive
 
So in the tutorial section for functions most of the values passed between functions are constant, I want to make a program that ask the user for two values to ...
[1 reply] : int addition(int a, int b) // Your 'c' variable isn't needed here { ... (by long double main)
by DaBOSS
Class Declaration Help
 
Hello cplusplus.com, this site was very useful for me and I'm new to the forums so... there's my breif intro. Anyway, I am (trying) to make a game and have enc...
[4 replies] Last: Thanks for the help, works great now. (by DaBOSS)
Is a class similar to a function?
 
Is a class similar to a function? im sorry i am very new to c++ and created a text based rpg already. but i wanted to move on to making a 2d game with sfml.but ...
[2 replies] Last: If you don't know what a class is yet you might want to slow down and ... (by DaBOSS)
Need some help with text based rpg
 
Hi im brand new to coding and have been practicing by making this text based RPG. And my problem is that when it gives you the option to go to shop or to fight ...
[10 replies] Last: [quote=Disch]I stand by this: If you're interested in game dev... work... (by BHX)
How do you correctly overload this operator>>?
 
I am creating my own String class, just to practice, but I have little experience in overloading operators. I would like that my string can have also spaces (a...
[2 replies] Last: If you are using C++11 always use nullptr. Agreed. If you are usi... (by cire)
move down a txt file
 
Is it possible to write a program that moves down the txt file each time the input dose not match the current line as followed #include <iostream> #include <s...
[3 replies] Last: The idea was that you wanted to move down a line after every check, so... (by closed account j3Rz8vqX)
how would i remove the first line in a txt file
 
Alright i have a txt file and i am making a program to open it and read from it but is their a way to make a section that will delete the top line in the file ...
[1 reply] : Open file for reading. Read the data into your array of strings. Close... (by closed account j3Rz8vqX)
Mouse move
 
Hi guys. I hope you can help me.. I need do a program with graphics ^g, I need if mouse is moved to the left the program show a sprites .. if I moved to the ri...
[no replies]
Using "const"
 
I'm coming to C++ from Python and a little bit of C. The syntax has been a bit weird to me. It seems like the hierarchy of most C-like languages, by how high- o...
[12 replies] Last: I think I may have a gross misunderstanding of the concept discussed ... (by Smac89)
by angelk
List
 
Hello everyone, I create a list as an element to an array. The length of the array is 5. Whenever I insert an element in the node I need to check that there is ...
[1 reply] : Hi All, so, now whats the problem? i cant get it! --- Have Nice Life (by amirtork)
by tdk93
structure nesting
 
Given the statement xy.ab.cd = 26; Which of the following is true? a) structure cd is nested within structure ab. b) structure ab is nested with...
[3 replies] Last: (a) If the given statement is assumed to be legal, then cd must be a ... (by MiiNiPaa)
by lays
Will the automatic memory allocation faster than dynamic memory allocation?
 
I tried to make test, but failed. clock_t begin = clock(); int arr ; clock_t end = clock(); cout << (end - begin) << endl; begin = clock(); int* p ...
[3 replies] Last: FOr windows you can use QueryPerformanceCounter function http://msdn.m... (by MiiNiPaa)
Any one have this book to help until mine comes
 
My class appears to have started before it was supposed to. I was away until this Sunday ordered my books but class started Wednesday and that night already thi...
[5 replies] Last: You're taking a class that requires you to spend over $100.00 on a 16 ... (by cire)
by vin
Why the double not in this while loop?
 
In some code I'm studying I found this double not. Can it be replaced with just while(fin) ? ... ifstream in(sourceFilename.c_str()); ...
[1 reply] : Although while (!!fin) should be equivalent to while (fin) there a... (by Chervil)
Count the number of occurences in a word in a many text file using c++ vector of vector
 
Write your question here. I have a collection of documents with each document represented by a vector of string ( vector<string> ) and the whole collection re...
[no replies]
Need Help
 
time_t qTime; time(&qTime); srand((unsigned int)qTime); What does time(&qTime); mean? Thanks.
[1 reply] : What it is doing is passing a reference to qTime to the time funct... (by TwilightSpectre)
system("PAUSE") is it really that bad?
 
Hello everyone, I had a book I wanted to go back to and re-read although the author introduces system("PAUSE") in all their practice programs. I personally und...
[1 reply] : pause: command not found Well, besides that, take a look at this: ht... (by long double main)
Exception handling problem(password and string thingy)
 
The program is working correctly when I put the pin correctly but when I put different pin this is the output http://www.tiikoni.com/tis/view/?id=d340a8b v...
[no replies]
May 2014 Pages: 123... 55
  Archived months: [apr2014] [jun2014]

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