General C++ Programming - April 2019 (Page 5)

PostMessage
 
Hello I have problem,one in which I was using SendInput somehow managed to block that,soo I cant use SendInput ,soo I was looking for another way to "input" mo...
[1 reply] : Since no one is answering this I’ll give it a go. Frankly, though, y... (by Duthomhas)
Nested Structures HELP
 
So in the code for my assignment I have to collect phone numbers, I know how to do the phone numbers but I'm having a tough time entering a name. For example ...
[1 reply] : The problem is a classic one of mixing cin >> and getline( cin, std::s... (by lastchance)
(help) hwid checker from url
 
Hi!, i would like to know how can i make a simple hwid checker reading the hwid from a pastebin or from some page. code: #include<iostream> #include<Windows.h...
[1 reply] : When you say "from a pastebin", what exactly do you mean? Where is you... (by helios)
Siblings of a BST Node Algorithm?
 
I'm working on an implementation of a Binary Search Tree and I'm having trouble in printing the sibling of a node in BST Can anyone guide me towards the corre...
[1 reply] : It's a lot like search. The function returns true when it finds the va... (by dhayden)
How to access first character from string returned by a getter
 
Write your question here. I have a near completed sort function that will sort a linked list of nodes. The linked list has two levels, so there is a container ...
[1 reply] : Most of that makes no sense. Linked lists should not use the generic ... (by keskiverto)
returning the first and last numbers in a file
 
Hello so this is the assignment statement: o return 0 if you set the first and last numbers from the file; return -1 if the file doesn't open or read properly ...
[2 replies] Last: #include <string> #include <fstream> // Return the first number in t... (by JLBorges)
Static library
 
Hello, I am having a problem where I have two projects in Visual Studio, one is a static library (.lib) and the other is and executable (.exe). The executable p...
[6 replies] Last: copy just the #includes and function protos in file.h to another file,... (by jonnin)
Heap corruption detected
 
#ifndef _POLY_H #define _POLY_H #include<iostream> using std::ostream; using std::istream; #include<vector> using namespace std; class Polyno...
[4 replies] Last: > What object should be modified in this code? *this (by ne555)
Linked List - access 3rd node onwards
 
Hi All, I haven't done C++ for a while but started getting back into it. I am experimenting with linked lists. I need to be able to display what is in th...
[14 replies] Last: just so you know, you can do it with the linked list. one way to do t... (by jonnin)
Having trouble understanding unique constructor syntax
 
In my textbook, Data Structures and Algorithm Analysis in C++ (Fourth Edition) by Mark Allen Weiss, on page 106, an example is given of a user defined class cal...
[5 replies] Last: Declaration of a variable: type name initializer Vector<double> fo... (by keskiverto)
by stav
What kind of smart pointer to return?
 
Hello This is a dilemma i run in to quite often and i figured i would finally ask about it. I have a function and i want to return an object to the user. What e...
[1 reply] : [quote=slav]First of all i should probably return a pointer rather tha... (by Duthomhas)
BLACKJACK CODE
 
I need help with unfinished BLACKJACK code please. Here is what I have so far: #include <iostream> #include <cstdlib> #include <ctime> #include <vector>...
[1 reply] : It's too bad that the rank and suit are set to the string values. It w... (by dhayden)
Lowest score drop assistance.
 
Here's my coding for this, I'm having trouble getting everything declared. #include <iostream> using namespace std; double getScore(double &); double fi...
[5 replies] Last: Nice, sure, alas: We have not done arrays in this class yet So I sug... (by MikeStgt)
Need Help with adding sum of multiple even numbers
 
So in my program i need it to add all the even numbers in between and its just adding 2 numbers together. For example if I enter 2 and 14 the total is 16. But i...
[10 replies] Last: @MikeStgt: std::swap( a, b ); would show the intent more explicitly ... (by keskiverto)
by erkoss
help in c++ please
 
Hello, I have an algorithm that I have to translate into C ++. I understand almost everything except: If (city contains characters from 0 to 9) OR (city con...
[5 replies] Last: thank you very very much for reply :D I will also look at the links y... (by erkoss)
if else number and letters? C++
 
I am trying to create a if else float on which when the user enters in a number value like 100.00 it should detect the users answer and if the user enters lette...
[2 replies] Last: A variation: #include <iostream> #include <string> double getInput(c... (by deleted account xyzzy)
Why is an integer being handled as a boolean?
 
I have set up a function that is meant to return a boolean, and the input type is int to allow for invalid numbers without crashing. bool getDone() { int ...
[2 replies] Last: Thank you :) I can see how it would parse it as you described, and uti... (by UberUser)
writing your own application layer protocol
 
Hi guys, I am following this blog on how to write your own protocol - https://mayaposch.wordpress.com/2011/10/03/design-your-own-protocol-in-five-minutes/ ...
[12 replies] Last: Look at the condition and increment parts of the loop: for ( int i = ... (by keskiverto)
time limit exceeding
 
There is a field with plants — a grid with N rows (numbered 1 through N) and M columns (numbered 1 through M); out of its NM cells, K cells contain plants, wh...
[6 replies] Last: Duthomhas, the OP messed up with cut & paste. The dimensions of the ar... (by dhayden)
float percentage (C++)
 
I am tring to make a flaot that can work both as a list and a indicater. The list is for each of the states (made floats form them), then to allow each state to...
[2 replies] Last: I would add 1 to all the taxes if you are going to use it to make tax.... (by jonnin)
April 2019 Pages: 1... 34567... 9
  Archived months: [mar2019] [may2019]

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