General C++ Programming - November 2017 (Page 3)

by MRH
Auto Clicker
 
how can i make that when left click is held it sent infinite left click, and when its no longer held it stop the infinite loop. i tried: while (GetAsyncKeySta...
[3 replies] Last: I think you still need an extra condition. I think you need while (... (by jonnin)
string literals of different character encodings
 
I am trying to create string literals of different character encodings: 1) UTF-8 string literal (using prefix u8"string") 2) char16_t string literal (using pr...
[1 reply] : There is std::wcout , but in cpp.sh it only worked for the last one. ... (by TheIdeasMan)
C++ SDL 2.0 main menu Function
 
I'm currently trying to write a menu function for one of my projects. I'm remaking pac-man and I'd like to be able to modularize the main menu ,calling it when ...
[1 reply] : I would suggest not to use outdated function. If you have these old fu... (by coder777)
by stav
library on top of library
 
Hi i'm trying to build a 2D game engine on top of SDL. In my "engine" folder i have a file called my.h which is what i expect the end user to include in his p...
[1 reply] : For a pointer you can always have a forward reference (like struct SD... (by coder777)
Advance reading from file
 
Hi! I tried to find an answer, but I couldn't find anything on this. If I need to read from file such line: 2017-10-11,2550.620117,2555.239990,2547.949951,25...
[3 replies] Last: OOOOOOO, thank you for help so much :D problem is solved And yeah I ... (by Rododendron)
Connect four trouble getting pieces to stack
 
// Connect 4our // Created by Gregory Hagins II on 11/2/17. #include <iostream> #include <string> #include <ctime> #include <cstdlib> using namespa...
[no replies]
Help please with receipt calculator!
 
How do I get this to work properly... I want it to output the item price and sales tax and total with sales tax for each item the user enters. And the it...
[3 replies] Last: @xokittenxo You're welcome. If you do have any questions or just want... (by whitenite1)
quicksort algorithm problem
 
I attempted a quicksort algorithm with a 10 element array but there seems to be a problem. After it is sorted, the second element in the sorted array is always ...
[1 reply] : quicksort should be recursive. It looks close but it is missing the r... (by jonnin)
Explanation c++
 
What kind of array is in each row of argv?
[1 reply] : http://en.cppreference.com/w/cpp/language/main_function (by keskiverto)
by NG99
update and delete the record from text
 
how to use the c++ to write the code : case 1: how to write the code for update the record (string) from the text file. can anyone show me some simple...
[3 replies] Last: If you need such thorough examples, then you really should be consulti... (by Chervil)
Binary Search Tree sorted by two keys
 
I have a fictional character class with a unique string member variable, name, and a second member variable that can have duplicates. The unique key is the name...
[1 reply] : Typical use case for Boost.MultiIndex, perhaps: http://www.boost.org/d... (by JLBorges)
Insertion sort for Linked lists
 
This assignment consists of getting linked list and sorting it using Insertion. I have completed the appending and printing part but having trouble to move past...
[no replies]
A problem with overloading the >> operator for a custom array class
 
Hello everyone. i'am making a simple class for dynamic arrays in C++: #include <iostream> using namespace std; template<class T> class Array { ...
[1 reply] : T& operator (int index) return a reference (not a value), so you can... (by ne555)
C++ Programming for the Absolute Beginner
 
Hello everyone! So i started reading this book it is called ,,C++ Programming for the Absolute Beginner, Second Edition" by Mark Lee and Dirk Henkemans.I am no...
[1 reply] : If you want to know the "why" of author choices, ask the author. Don... (by cire)
new int with no overwrite
 
I have a int* that named arr and have a function that called in main(); this function named push_back that add a int to arr; I also have a function named pop_ba...
[1 reply] : actually, they aren't being deleted, they are simply lost, drifting in... (by ne555)
how to convert block compressed row to dense matrix?
 
I'm interesting to create a class for storing sparse matrix in Block Compressed Sparse Row format : https://ibb.co/ffrKDR (picture) this method of storage co...
[1 reply] : I've figure out the way to plot the "blocks matrix" the smaller in the... (by drudox84)
What is wrong with this binary search algorithm
 
Hello, I have currently written a code for the binary search algorithm. However, the code does not seem to be working when I input a vector of {2, 4, 3, 1}. Can...
[4 replies] Last: One way to do it is to simply copy the C++ code from the website you l... (by Chervil)
by blanm
Route planning algorithm (1,2)
 
I have a design project for an engineering design course, the goal is to design a tunnel system beneath the Queen's University campus (in Kingston, Ontario). It...
[21 replies] Last: Well, I'm not sure about the GPS in a phone, I might try it at some po... (by blanm)
odd and even mouse clicks
 
We've been tasked to make a tic-tac-toe game but it seems like were all getting stuck on alternating between X and O and instead each click outputs and X in a b...
[2 replies] Last: The way we were taught to do it today was with all the if's, i agree i... (by Fillip F)
Range-checked list class?
 
How do I make a list class range-checked? The code I'm using is here: https://gist.github.com/DragonOsman/87a1e9fba06d49cab9b5b556c7dd31eb (too long to put in ...
[6 replies] Last: So I shouldn't check for cur->succ being nullptr in increment? I fi... (by DragonOsman)
November 2017 Pages: 12345... 16
  Archived months: [oct2017] [dec2017]

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