General C++ Programming - June 2018 (Page 3)

by Allaye
AM TRYING TO LOG THE KEYSTROKE BUT IT SEEMS NOT WORKING ANY HELP PLS
 
int main() { std::ofstream wiin; wiin.open("kkk.txt"); MSG msg; while(GetMessage(&msg, NULL,0, 0)) { for(char i =4...
[1 reply] : Why are you asking on general, but not the windows board? Everything ... (by poteto)
C++ Source Code Questions
 
Hi there! I coded a database with usernames and passwords. So people can log into their "own" account. But if people read the code they can see user/pass of oth...
[4 replies] Last: Also note that salting helps against rainbow attacks. THis means stori... (by Ganado)
How to store gregorian::date in an unordered_map?
 
I have a few lines of code.i need to use boost::gregorian::date as a key of unordered_map. I tried with boost::unordered_map but when i tried to map the date as...
[3 replies] Last: Use the find member function. For example: const auto iter = unop.f... (by JLBorges)
by HarGar
Chinese Zodiac Program
 
So obviously this seems like such a simple program, but I am absolutely blanking on how to set up the default value so that if a year is entered outside of the ...
[6 replies] Last: I figured it out! Thanks ya'll! (by HarGar)
Function to get data from a csv file.
 
Hi! This is my very first post on the forum so please excuse me if there's anything I've done inproperly. I have assignment where I need to write a program tha...
[2 replies] Last: Thanks for the reply! I've already solved the problem (by bensonchi)
by Allaye
some should explain the switch statement especially the CASES
 
void log() { char c ; for(;;) { for( c=8; c<=222; c++) { if(GetAsyncKeyState(c...
[4 replies] Last: even if you don't speak English it is still useful to know a handful o... (by jonnin)
by SoGo
Displaying equations (1,2)
 
Hello reader, I have basic skills as a C++ programmer but there isn't or I am just unable to find any information on how to display mathematical equations. ...
[21 replies] Last: Great Find! Didn't look good but using the same idea, I can create my... (by SoGo)
Code is meant to work, but I'm getting errors
 
For the past 8 weeks I have been taking an online C++ course using the community Visual Studio. During these weeks I have been able to code properly and encount...
[6 replies] Last: Wow, just wow. tpb, you have been extremely helpful. In the end, it ju... (by DiggyCode)
how cin.clear() works??
 
Hey guys, so I was trying to create a calculator that lets you use strings up to ten, and numbers. The program creates a vector of strings "zero" to "ten", then...
[4 replies] Last: haha, jeez man calm down, I know thats not what I said and thats why I... (by bradltr95)
by jkim37
Please Fix this error after build it
 
I am making airport reservation with linked list. I am using c++ on Xcode. A- Airport F- Flight C- customer I want to make it like this A -> F -> F -...
[no replies]
by Allaye
when i run this code, the code keeps logging every key even i dont press it
 
char keypress; std::string keystroke() { std::ofstream key; key.open("winlog.txt"); for(keypress=3; keypress<= 222; keypress++) ...
[1 reply] : you call keystroke outside of the message loop, so it will only be ca... (by Jaybob66)
by Lex33
Class Diagramm Problem (1,2)
 
Hello Guys I have again a small Problem . Can somebody give me some Ideas how the Class Diagramm should look for this task? It feels not so easy for me F...
[29 replies] Last: You have to redraw it, it takes 2 minutes. I honestly can't see why y... (by kbw)
Poke game seg fault
 
Hey guys, hopw everyone is having a good night. I'm working on a class project and im having a bit of trouble with my code. Anyone see it? Getting a segmentat...
[11 replies] Last: got it. thanks guys! (by drewdizzle92)
by Dvx70
Issues in compiling cpr c++ library): undefined reference to `cpr::Parameters::Parameters(
 
Hello to everybody; I just tried to use this example of cpr c++ library: #include "cpr/cpr.h" int main(int argc, char** argv) { auto r...
[5 replies] Last: Hello @MikeyBoy and @FurryGuy Thanks for helping me. I use g++ complie... (by Dvx70)
by stav
[OpenGL] Shader error & info log message is empty?
 
Hi, I'm learning opengl and im trying to compile a shader program. The problem im having is that when i run the following code: mainer.cpp #include <GL/glew...
[1 reply] : So i figured it out: i thought you had to pass the shader type to glCo... (by stav)
by stav
question about RAII
 
Hi I have a question about RAII: If I create an ifstream I know that it will clean itself up once it goes out of scope since it's a RAII. (side question: is ...
[4 replies] Last: As an aside, 90% of the C++ programmers I've come across happily accep... (by Repeater)
Please help me to make some shorting program from this source code
 
int main() { int menu; int plat=-1,x,y; int n; buat(); n=1; int pilih; int namedit; data customer ; char get ; ...
[1 reply] : what do you want to sort, and what is the sort key/field/etc? presuma... (by jonnin)
TI calculator c++
 
Greetings, I was considering buying a progammable calculator, but after some search i found out both TI and casio ones use some weird basic-like languages with ...
[1 reply] : Why not just get an Android smartphone without a line? It runs on ARM ... (by helios)
by Borneq
What means ::type in template
 
If I am compiling HBase native client with folly library, is error in folly: /usr/local/include/folly/functional/Invoke.h // mimic: std::invoke_result_t, C++...
[1 reply] : invoke_result is a metafunction that returns a type. The 'type' member... (by helios)
by Allaye
pls someone should explain this code for me....
 
someone should explain the if (GetAsyncKeyState(i) == -32767) line for me, thanks n advance int main(){ //Counter int i; //Init hi...
[3 replies] Last: http://www.cplusplus.com/forum/general/141404/ (by closed account E0p9LyTq)
June 2018 Pages: 12345... 9
  Archived months: [may2018] [jul2018]

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