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

Debug small error
 
I have this code that I a suppose to debug. I am not sure what is the problem I am facing. Please help and advice. #include <iostream> #include <cstring> u...
[2 replies] Last: You have to tell us what the problem is first, then we might be able t... (by Thomas1965)
Building error in visual studio
 
I am a beginner/intermediate programmer and am getting this error when I try to build my code : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\...
[7 replies] Last: Since VS 2010 MS has moved global project options in an effort to keep... (by Duthomhas)
home keylogger
 
im trying to create a keylogger that can run off a usb and can save to a log file on the usb for my home computers to tell if someone other than me has been usi...
[4 replies] Last: used to be pulling it off the motherboard and putting it back would c... (by helios)
Program freezes on call of delete
 
I have this code: // Osman Zakir // 11 / 10 / 2017 // Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition // Chapter 20 "Find highes...
[2 replies] Last: I should say that I wrote get_from_jill() and get_from_jack() myself a... (by DragonOsman)
Indexing variables pushed to two different queues
 
Hi, I use two different queues (one for command and one for address) I have a requirement to identify the order in which elements are being pushed to these ...
[1 reply] : in method push: static vector<something> command_order; ... command_... (by jonnin)
by Clos
check if a number is prime from an array
 
The problem is in the main function where the for loop starts. I need to figure out if a number from my arraySizeBase is prime and if it is then my string array...
[1 reply] : one simple algorithm for this is: a number is prime if gcd(N, sqrt(N)!... (by jonnin)
by bonho
SQL help
 
Sorry this is not entirely C++, though it is a part of my C++ program to retrieve data from database. The program needs to select the top 1000 rows from a tabl...
[1 reply] : the easiest thing to do, since you are doing this in a program, is sim... (by jonnin)
error C2794: 'iterator_category': is not a member of any direct or indirect base class of 'std::iterator_traits<_Iter>'
 
My code: template<typename Iter1, typename Iter2> Iter2 mycode::copy(Iter1 f1, Iter1 e1, Iter2 f2) { if (f1 == e1) { std::cout << "List is empty. Noth...
[10 replies] Last: Yeah, thanks. That did work for me. (by DragonOsman)
Having trouble running switch
 
been having problems running switch on my code which when I run it it says only "Could only chose 1,2, or 3. I have to make it run when chose different color. ...
[1 reply] : Please try to edit your post and put [co de] [/co de] tags aroun... (by Ganado)
function calls within member functions not working
 
Hi, Am trying to call glutDisplayFunc(FPS_cam::display); from within void FPS_cam::init_callbacks() { glutDisplayFunc(FPS_cam::display); } ...
[2 replies] Last: A similar issue is addressed in this thread http://www.cplusplus.com/f... (by mbozzi)
Reading .CSV file with colon into two dimensional array
 
I'm trying to read a .CSV file and then save the values into two dimensional array. My problem is that I can't save the date into the columns and the temperatu...
[1 reply] : All simple* CSV I/O looks like this: Read: string s; while (get... (by Duthomhas)
Tree-Based Tic Tac Toe Using Minimax
 
Hi guys, I am doing an assignment that requires me to use tree nodes and minimax algorithm to make a tic tac toe game. It would be player vs the computer. Eac...
[no replies]
C++ problem
 
This is my deposit implementation code: ----------------------------------------------------------------------------- #include"deposit.h" #include<iostream> ...
[1 reply] : I can not return the deposit, which I input into the deposit.cpp file... (by Enoizat)
program chashes
 
I need help figuring this out, this program works fine on my linux machine but not my mac. when I run it on the mac, sometimes it crashes, but not on linux. ca...
[1 reply] : Is it a puzzle? :-) To check a code which apparently works, we need a... (by Enoizat)
grab keys save to variable
 
so iv been looking around trying to find a way to grab key presses from the user no matter where they are typing using a keyboard hook and saving the keystrokes...
[1 reply] : I'm afraid you need some library like Ncurses or PDcurses or similar -... (by Enoizat)
Bannanas code
 
#include<iostream> #include<string> using namespace std; int main() { string apno; float hrtr,tahr,subt,boni,tota; cout<<"Calculos de pagos\n\n"; cout<<...
[1 reply] : I see no question here. (by goldenchicken)
Simple String Class Segmentation Fault
 
I am doing a simple string class program using dynamic allocation and c-strings. I can get everything to compile, but I get a segmentation fault. the program ...
[4 replies] Last: Dealing with seg faults can be exhausting and those bugs are hard to b... (by benhart)
vector iterator error on code
 
On this code: if (std::find(vec.begin(), vec.end(), 3) != vec.end()) { auto pos = std::find(vec.begin(), vec.end(), 3); std::cout << "\nThe value 3 is at...
[3 replies] Last: @Coder777: Yeah, thanks. That did it. How about I just overload the ... (by DragonOsman)
How to evaluate postfix expression with linked lists instead of integers
 
Ok so I am working on a program where I have to convert an infix expression to a postfix expression, then evaluate it using stacks. I know how to convert it to...
[1 reply] : I just got rid of anything that had to do with result and now it seems... (by Metalman488)
How to read an equation from STDin
 
So I'm trying to figure out how I could write a program that reads user input from STDin in the following format: y = mx+b. I want the user to be able to enter ...
[2 replies] Last: Thank you very much! (by AlexanderGreen)
November 2017 Pages: 1... 678910... 16
  Archived months: [oct2017] [dec2017]

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