General C++ Programming - January 2015 (Page 9)

One error
 
This is the error message I keep getting. main.obj : error LNK2019: unresolved external symbol "public: __thiscall Defense::Defense(class std::basic_string<char...
[2 replies] Last: Wow. I can't believe I missed that. Thank you so much. I really apprec... (by Boomers)
by beko
Ordering a map by value
 
So I have a map of the form: std::map<std::string, int> m; I want to order this by its int value, but I don't know how to write such a function. I've had ...
[2 replies] Last: You could use boost::multi_index. (by kbw)
Switch Statement
 
Question: The program is about to compare any two numbers. Then, it will display whether the number is minimum or maximum. Please use switch statement. Here'...
[12 replies] Last: > I HAVE TO USE SWITCH!!! IT's PART OF THE QUESTION switch( (x>y) - ... (by JLBorges)
Changing String to bool?
 
Hi I want to change string to bool but I'm having trouble doing this. Any help is much appreciated. #include <iostream> #include <fstream> #inc...
[2 replies] Last: > I want to change string to bool but I'm having trouble doing this. ... (by JLBorges)
Error Prompt
 
Okay, hello. I would like to ask if there is a problem with my codes that it gave me an error message that sounded like 'Fault: access violation at 0xXXXXX: rea...
[4 replies] Last: you should check code again. (by AssignmentExpert)
Dynamic Array Allocation Program
 
I am trying to read from a file the names, id numbers, and 4 grades of 5 stduents. Here is the code: #include "stdafx.h" #include <iostream> #include <fst...
[4 replies] Last: Yes, there is a very simple way. std::vector<> is very easy to use. ... (by JLBorges)
C++ Camera/Collision Detection Problem
 
Hi guys Still working with SDL2 and c++ my map collision is messed up since I implemented my Camera. I do understand that everything has a relative Position o...
[11 replies] Last: Anyone? This is a voluntary Project for School making out 100% of my e... (by HalfNOoB)
where am I going wrong?
 
Hi there Im a complete 'NOOB' to c++ and an absolute beginner. Im creating a program with parameters to convert pounds to euros, I keep getting this errorc2447:...
[1 reply] : void showPriceInEuros(int pounds, int euros); // is wrong { // your... (by sujitnag)
Selecting the design pattern for validation
 
I am looking into some design pattern which helps me for validation. Please let me know if you have any suggestion. I thought about using strategy but not s...
[3 replies] Last: Thank you (by kulkarnisr)
Horrible Error: LNK2019
 
Hey. I have a real problem. I am making a small 2D game and am trying to set up the SDL, but when i try compile it, these horrible error appears: Error 2 err...
[2 replies] Last: You forgot to link to opengl32, or you're using GCC and need to reorde... (by S G H)
by dkaip
cannot bind ‘std::basic_ostream<char>’ lvalue to ‘std::basic_ostream<char>&&’
 
Hello. In code in my project i have no problem. But sinse remove it in new header file compiler says cannot bind ‘std::basic_ostream<char>’ lvalue to ‘std...
[12 replies] Last: The all mesage ... main.cpp||In instantiation of ‘stringify operato... (by dkaip)
by VitorR
Converting numbers - the easy way
 
Good morning everyone, I'm a games/apps developer and right now I'm developing games/apps for iOS, Android and also PC / Facebook. I've also been working on C+...
[2 replies] Last: Is there any easy way to code a value conversion From where to where... (by MiiNiPaa)
wrong check for Batch code entry end condition?
 
#include <iostream> #include <fstream> #include <string> using namespace std; int check_Pythag(int DIMA, int DIMB, int DIMC) { if (DIMA*DIMA == DIMB*DI...
[4 replies] Last: This is a duplicate topic. dhayden gave the answer in the other one... (by TheIdeasMan)
Cannot seem to make code display lines
 
Hi! I'm trying to write a code that displays lines between user designated points with circles at each point, but I can't get the lines to display! I'm at a los...
[1 reply] : Hi, Please don't do multiple posts about the same topic, just keep th... (by TheIdeasMan)
by cosmos
what's different between pass vector iterators and deque iterators in following code
 
namespace sort { template <typename Itr> using type = typename std::iterator_traits<Itr>::value_type; template <typename T> using viterator = ...
[4 replies] Last: thank you very much (by cosmos)
NEW QUESTION EDIT: cannot convert int to int*
 
Hi, I'm a first year c++ programmer and am having trouble with this code. The errors are... error C2059: syntax error : ']' for this line drawPolyLine(x,...
[10 replies] Last: now I just have to figure out why my graphics aren't what they're sup... (by MissKaramatic)
Random Number Guessing Game
 
Write your question here. I am trying to get the user to enter the min number allowed and the max number allowed for the random number to generate between. I a...
[2 replies] Last: Thank you, I will try that when I am back in school friday. (by Sheldon255)
Values wont stay negative
 
I have a function that rotates a vector 90 degrees. Only problem is, i never get negative values. For some strange reason, no matter what i do, the value of x i...
[8 replies] Last: It rotates point 90° counterclockwise around point [0; 0]. Everythin... (by MiiNiPaa)
Friend function can't able to access private member
 
Am trying to write table object into file. Here's the source code .hpp file class Table { private: int table_no; std::string table_type; bool ...
[4 replies] Last: Hi MiiNiPaa.. i can't write the programme of object oriented programmi... (by black eagle)
by lolwe
Satck Input/Output files
 
Create a program that contains the following functions: -create two dynamic stacks with integer data contained in an external file. -Sort items in stacks by t...
[no replies]
January 2015 Pages: 1... 7891011... 24
  Archived months: [dec2014] [feb2015]

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