General C++ Programming - February 2015 (Page 7)

Map inside a map sorting
 
Hi all, I'm relatively new to programming in C++ and I need some help. I have a map which contains a multiset and another map std::map<std::multiset<int>, s...
[9 replies] Last: Thank you very much, it works perfectly!! (by adamsafc)
How can I control the speed at which a loop loops based on an outside variable?
 
Alright, So i'm using an animation program. In this program I've simulated a particle system. The particles are flying around at different and varying speeds. I...
[8 replies] Last: Thanks, @shoyoninja. You probably saved me a lot of time with the loop... (by Tanzola)
Weapons' names generator
 
I'd like to make a simple generator of names for weapons, in this format: adjective type_of_weapon for example: hero's bow Words would be stored in a text file...
[7 replies] Last: So now I've got to learn about std::map and find some good JSON librar... (by TheHardew)
dll and static
 
I make both lib in code block. my question is that link both lib with another program(prj1) are same. 1) copy dll file and past in prj1. 2)setting->compile...
[2 replies] Last: I use window operating system (by sujitnag)
code::blocks multiple programmes under a single project
 
I have started using code::blocks for practicing ,(was using bloodshed dev C++ til now) the thing is that m not able to complie multiple programmes stored unde...
[1 reply] : m not able to complie multiple programmes stored under a single proje... (by MiiNiPaa)
can i convert a class?
 
can i do macros\class for convert these class: class Button1 : public Button { public: Button1() { onClick(); } void onClic...
[2 replies] Last: see that 2 class's. imagine convert the 1st class to the 2nd. can i do... (by Cambalinho)
How to create a class object inside another class?
 
My thought is that I would need to establish a variable for the class in the header and call the class within the .cpp file //class A.h B b; Then in class ...
[6 replies] Last: LB thanks for explaining that. I had done some work in C and of cours... (by retroCheck)
Makefiles: mingw32-make and nmake won't find ifeq
 
I'm with a big project. If the target isn't Windows, print a message and exit. Anyways, that's not the matter. I'm trying to use the conditional directive ifeq...
[no replies]
OFStream in vector failing to open file. Failbit is 1 badbit is 0.
 
I'm trying to move a dictionary into a group of bite-sized files based off of the length of the strings in each file (I'm ignoring strings of length 1 for obvio...
[2 replies] Last: So, I found the answer, and it was something weird that I wasn't used ... (by GRex2595)
Help with calculating sum from integers read from a text file
 
I have the following code. Everything compiles but when it runs the sums are not correct. I need to calculate the sums for all the odd integers, the even inte...
[4 replies] Last: The precision for decimal places is floor(x*100+.005)/100 the precisio... (by sly858)
help with understanding c++
 
i am new to c++ programming and lost in that class., the professor gave a homework and i do not understand it. i have google . a nd went on youtube to get video...
[4 replies] Last: What do you have so far? off had i would check into while loop, if sta... (by sly858)
by GTR4j
finding all prime #'s using "class Number"
 
Write a program that prompts the user to enter a number larger than 2. The program should use the Number class to determine the prime numbers between 2 and the ...
[1 reply] : 1st find formula / procedure what are the rule to find out a number is... (by sujitnag)
storing file data in an arrary
 
I have a structure struct Wine { string wineName; int vintage; int rating; double price; }; how can i store the file data b...
[1 reply] : You should store data in a file as you show in example. then 1) read ... (by sujitnag)
Can't figure out this problem
 
Hi forum, i'm new here. I'm creating a K value calculator. I'm wondering if i'm doing something wrong because the value of K is ALMOST always like 1 or 0, ...
[2 replies] Last: YOU ARE ABSOLUTELY RIGHT. God damnit... i'm so stupid.. hahaha. It wa... (by YourBroAlex)
C++ Turtle Graphics
 
I need to make a 20 by 20 array or floor which is initialized to zeros, keep track of the current position of the turtle at all times, the direction it is hea...
[no replies]
Creating Unique Variables with a #define
 
So I have a friend who is trying to make something in VB, where he has an array of buttons that he gives unique labels to put into an array. He doesn't know bef...
[6 replies] Last: Yeah, we found out what the problem was. It was a VB issue, so I knew... (by GRex2595)
Help with pointers
 
Hi all, I'm new to this forum. I need help understanding this program. Why does it pop element from the back similar to stack? Any help is appreciated. #i...
[1 reply] : The function recurses before it prints. (by LB)
More Looping?
 
Sorry to bring up looping again, but I've got a random number generator in my program. with the program looping "x" number of times, the random number generator...
[3 replies] Last: http://www.cplusplus.com/reference/random/ http://en.cppreference.com/... (by LB)
OPERATOR OVERLOADING
 
Im trying to do line 92 with the overloaded operator << on line 69. I dont think i did it right. Can somebody please help me that? Thanks #include <iostream...
[3 replies] Last: I fixed it already. I wanted to make statement like cout<<getMaxTemp... (by programmercarlito)
I/O Redirect Unix/C++
 
Looking to use C++ to take input from a file in Unix. Filename could be any name at any address such as: $ ./a.out < /some_address/inputfile.txt In ...
[2 replies] Last: Ah, thanks. I was under the impression it was just giving file name. (by whalord)
February 2015 Pages: 1... 56789... 26
  Archived months: [jan2015] [mar2015]

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