Beginners - August 2013 (Page 48)

Confused about erasing elements in STL vector
 
Hi. Let's say we got : std::vector<Human> humans; std::vector<Human*> selectedHumans; You can select humans which are stored in 'humans'. The selectio...
[7 replies] Last: > Would using another container for humans be a good idea? Yes. > I... (by JLBorges)
Error: Expected primary-expression before '==' token
 
I Keep Getting The Error. Error: Expected primary-expression before '==' token. Can somone help #include "placeName.h" #include <iostream> #includ...
[3 replies] Last: Possibly like: class RandonRegionName{ private: int placeN... (by abhishekm71)
by Dalos
Detect colours
 
I'm working on a game that uses different colours and I was wondering what is a api or library that could allow me to detect the colours on certain text. And i...
[6 replies] Last: Google "msdn ReadConsoleOutputAttribute" for how to get the color (att... (by Duthomhas)
Game programming: duplicating enemy objetcs
 
Hello everyone, I wanted to know if anyone could help me out understanding how to do a certain thing for y C++ SDL2 game. It's a 2D Tile Map Final Fantasy...
[15 replies] Last: Aight guyz, got it to work all I needed to do was the following: CSp... (by Cydriic)
by nmn
operator<< overloading
 
I don't get the 'chaining' part of this overload. Could someone explain it to me please ? I've overloaded for this call: cout <<obj1<<obj2<<obj3; but it seem...
[1 reply] : Your function should look something like: std::ostream& operator<<(... (by kbw)
by itayz
Need command name or example
 
Hello, random backround; I recently started learning how to program, I've made a few small programs and I want to challenge myself, this is not supposed to b...
[3 replies] Last: Look at this: #include <iostream> #include <string> int main () { ... (by condor)
by aggsyb
Windows Forms, make a text box string variable public?
 
Just playing about with Windows Forms for the first time after writing a fair bit of console code. I know how to store strings from text box's but my question i...
[1 reply] : On second thought, do I actually just put all my main function code in... (by aggsyb)
I Can't Understand This Logic, HELP
 
Write a program that asks the user to type all the integers between 8 and 23 (both included) using a for loop. http://en.wikibooks.org/wiki/C++_Programming/E...
[6 replies] Last: Thanks htirwin, if only there is a 'thanks' button :D (by geezle86)
issue with pointers
 
my visual c++ 2012 fail to compile it. error C2440: '=' : cannot convert from 'int *' to 'int' #include "stdafx.h" #include <iostream> using namespace std; ...
[5 replies] Last: i resetart VS and it seems ok thanx. (by Rakanoth)
by aggsyb
Vector subscript out of range? ifstream
 
Only just started using vectors and pretty clueless with them! anyway... I am grabbing all file names in a directory with a .txt file extension. Storing those f...
[4 replies] Last: Jesus , sorry for wasting your time I was being so dumb. I set my loop... (by aggsyb)
Dynamic Arrays / Vectors
 
Hi everyone, I have a C++ question that is seemingly simple but I cannot find an answer to my situation. How do you create an array if you don't know its siz...
[3 replies] Last: std::vector<std::vector<double>> myVec; For me it's more helpful to... (by Olysold)
please help.. beginner cout problem c++
 
dear people, I just started with learning C++ I hope you can help me with this issue. #include <iostream>; using namespace std; int main() { int ...
[2 replies] Last: thanks alot, DevC++ did just say that there was a missing character..... (by demigamer)
Food menu problem (problem with if statement or while loop)
 
My food menu program was designed to ask what the user wants to eat out of the 3 choices (burger, fries, pizza) and if the string wasn't one of the 3 options it...
[19 replies] Last: while (food != "burger" && "fries" && "pizza") This does not mean w... (by Olysold)
by aggsyb
Storing list of file names as a string array? (1,2)
 
Hi, I am using the following code I found to list all files with a .txt extension within a folder. //GetFileNames Function void getFileNames() { WIN32_FIND...
[24 replies] Last: The main difference is that the specification for the files you're loo... (by cire)
INLINE
 
what is the advantages of inline ? is it save space in memory if yes then how and if a code is defined in class how long it can be to be treated like a inline f...
[2 replies] Last: Specifying a function as inline makes it possible to define it in mu... (by Cubbi)
Fstream with txt
 
i am trying to ask a user for a string which is pushed into vector. then i need to open the txt file and compare what the user wrote to the txt file.any ideas ?...
[1 reply] : #include <iostream> #include <fstream> #include <string> #include <ve... (by closed account Dy7SLyTq)
cpp library
 
i want to know that #include <iostream> it included std. input output library and using namespace std also included standard lib. then why we have to write bot...
[8 replies] Last: ohh..thats the thing! thank you very much disch!..:) keep it up! carry... (by hellcoder)
How to fwrite and fread for Vector
 
Hello, I made codes in c++, for encryption and decryption. first code creates an output in vector and then write it in a file by using fwrite, and the second r...
[1 reply] : I've googled, and found out that the logic to write vector to a file ... (by Cubbi)
counting word occurrence in a file
 
I am supposed to count the number of times the word "the" appears in a file. i have to count it case sensitively("THE", "The") and case insensitively("the") ...
[7 replies] Last: Of course it would be much better to transform the argument also to up... (by vlad from moscow)
how can i work with paragraph ?
 
hello i have a small program consisting on getting a paragraph from a user storing this paragraph in a text or word file if possible. than to read back the p...
[6 replies] Last: yes they can, but it makes it easier with vectors. That's only true... (by MikeyBoy)
August 2013 Pages: 1... 464748495051
  Archived months: [jul2013] [sep2013]

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