General C++ Programming - February 2016 (Page 16)

by josex
subroutine & pointers help!
 
I created a program based on the instruction below, but do not know about this pointer, subroutine a...
[3 replies] Last: Thank you so much. I will look at this and learn it. My coding did e... (by josex)
type error in struct?
 
Below I am getting the compiler error: src\main.cpp:7:2: error: 'Card_Ranks' does not name a type ...
[4 replies] Last: Forward Declarations (by RUNNER PRO AGARIO)
Application crashes in Debug mode, but doesn't in Release mode
 
Hi. As a test, I'm using this code #include <iostream> #include <conio.h> #include <string> usi...
[2 replies] Last: I'm using VC++ compiler, not GCC. And yes, it warns me but in Debug m... (by gedamial)
std::array out of range error in simplified Blackjack game code
 
On LearnCPP, there's an exercise asking to play a simplified version of Blackjack. I was having tro...
[18 replies] Last: I'll try calling the printCard() and printDeck() functions in main(). ... (by DragonOsman)
Vector is loading values (int) that it should not
 
I have written a program that asks the user to input integers 10-100, inclusive, and load them into ...
[1 reply] : validateValues does more than just validate a value (why is it plura... (by cire)
I need to make this program shorter
 
I have this program #include <iostream> // cin, cout #include <string> // strings #include <...
[1 reply] : I suggest some functions. Try to reduce the code duplication. Also I... (by jlb)
What do you think of my SDL2 program so far?
 
Hi everyone, I started learning C++ last month. I've learned enough basics to begin working with ...
[3 replies] Last: Why make the SDL_Event object a a local variable in game loop instead... (by Peter87)
Please Help !
 
The C++ syntax has real molested me. I am completely stuck. For those who has assisted me before and...
[9 replies] Last: One of the goals of a database is to not read all the records into m... (by dhayden)
Copy constructor gets called instead of inizialier_list<> constructor
 
Hello. struct Foo { Foo() { cout << "default ctor" << endl; } Foo(std::initial...
[5 replies] Last: because i'm explicitly converting the floating-point number no, it c... (by Cubbi)
My static library project is somehow related with my 'test' project
 
Hello. I've made my own Static Library project on Visual Studio. The problem is this: unless I...
[10 replies] Last: Thanks to everyone ;) (by gedamial)
problem in POPPING ARRAY QUEUE
 
#include<iostream> #include<stdlib.h> #include<conio.h> using namespace std; const int s=50; int...
[2 replies] Last: Yes you are right. Thanks. (by gaurav97)
bubble sort error
 
#include<iostream> using namespace std; void swap(int&a,int&b) { int temp=a; a=b; ...
[5 replies] Last: THIS IS A SIMPLE VERSION OF YOURS. HOPE IT HELPS... #include<iostream... (by Kinyo356)
by kalki
Finding out no of 1's in a given no ??
 
How to find number of bit set in any given number ? Say int x=7; Number of 1's set in x are 3
[1 reply] : In three steps: 1. Your number mod 2 to get the final bit's value. 2. ... (by TwilightSpectre)
Unresolved issue
 
I get the error 1>Rpn.obj : error LNK2019: unresolved external symbol "public: void __thiscall Qu...
[9 replies] Last: Ok. make elements of type float then :+) And make Queue::add ac... (by TheIdeasMan)
Error Vectors out of range
 
The error says Error: Vector subscript out of range i have 3 chosen for k, i do not see how it is o...
[1 reply] : Hi, You are using n (= 10) in the for loop, but numbers only has ... (by TheIdeasMan)
Double Digit sort issues
 
In the code below I have created a simple bubble sort algorithm. It works for the most part but for...
[2 replies] Last: Right, that makes sense, thanks (by AgentNoise)
Vector Inventory problem fixed
 
This is my implementation of a vector based inventory system. I had a lot of help from AbstractAnon,...
[12 replies] Last: So after some tinkering i have found that it is better to use pointers... (by NoviceNate333)
Access violation exception thrown - please help
 
When trying to fill an array of structs, I got the following exception thrown: Unhandled exceptio...
[5 replies] Last: Look at your sort function: void selectionSortNames(Student students ... (by jlb)
c++ and joystick
 
Hello everyone. I want to know if there is a way to manipulate joystick with c++ without using an...
[3 replies] Last: @Thomas1965, thanks for the reply. I know a few libraries does the sa... (by closed account 28poGNh0)
memory leak in code snippet?
 
Is there a memory leak in this code snippet with ptr being reassigned to another address &x to &y? ...
[4 replies] Last: Thx for clarifying. (by technologist)
February 2016 Pages: 1... 1415161718... 21
  Archived months: [jan2016] [mar2016]

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