General C++ Programming - December 2016 (Page 3)

Expression: Subscript out of range
 
// Other solutions haven't helped me. I have been searching high and low and inbetween for the issue here. I've seen many posts where this same issue is solv...
[6 replies] Last: Again, thanks to all of you guys. This certainly goes beyond what was ... (by PhiliChez)
Struct & Array Functions
 
Hello, I am having problems using the struct function and arrays. This is the code I have written, it complies successfully and everything but are missing a few...
[5 replies] Last: Here is an example of what I mean. #include <iostream> #include <i... (by Bdanielz)
How to properly declare and then assign a value to a pointer ?
 
I have a code where the following works: //code 1 int* p1 = &v1; int* p2 = &v2; . . . But the following doesn't: //code 2 int *p1, *p2...
[2 replies] Last: Thanks, I figured that and applied too but there seems to be a problem... (by quantatanu)
Create a file with current date and time name
 
Hello ! What I am trying to do is : 1. Create a copy of an existing file and open it. 2. Name the copy with the current date and time. str = date and...
[2 replies] Last: Thanks a lot, problem solved now ! :) (by irina2696)
Rock Paper Scissors Game for PPP 2
 
I wrote this with srand() and rand(), since I know it best with that, but the book says to use a vector holding the integers 1, 2 and 3 and have the program use...
[4 replies] Last: Right, I'll define a constant, then. Thanks for pointing that out. I... (by DragonOsman)
Error: Illegal pointer operation (tovalue) !
 
I have the following program: // code - 1 #include <stuff to be included> void rmacro() { int* p1 = &v1; const bool condi1 = *p1 > 0; if(con...
[2 replies] Last: Understood the difference, now will apply this on my code and will rep... (by quantatanu)
How to add a external header lib to a VS2015 Project
 
I generated a lib of all the functions inside of a game by using DLL injection. The next step in my project is to incorporate the generated SDK into my own DLL ...
[no replies]
Problem with map arguments in template class and definition of derived class
 
Hello, I have just started learning about templates , here I am facing problem in defining the derived class from the template class . //template class i...
[8 replies] Last: One option to consider is declaring the map in the base class with a ... (by JLBorges)
by helios
Strange compiler behavior
 
I'm using MSVC. I'm writing an emulator, and I have all the opcodes implemented in their own functions, all in the same file. The functions are generated at ...
[11 replies] Last: True, but how can you know why it's doing something until you know exa... (by dhayden)
File Transfer - TCP
 
I am writing a program that transfers a .BMP file over sockets and am having an issue with the received file. It says that the transfer is complete and the resu...
[11 replies] Last: I have moved this topic to a more suitable forum. I cant delete this t... (by Googie85)
How do I test equality with this particular code?
 
I'm trying to use an equality operator on a particular variable but Visual Studio is letting me know that: "no operator "==" matches these operands". I'm usin...
[2 replies] Last: Jay thanks a lot, that worked. I just had to convert the var type with... (by hashbrown)
A problem in RSA code
 
Hi. I searched on Internet to find RSA implementation, finally I found that code, but the problem is ,it doesn't give cipher text. Can someone help? #incl...
[5 replies] Last: Ok, Helios. Thanks a lot. (by omer123)
and sign in function return definition
 
Hello! I have defined my own class usign template for dealing with vectors. I have been looking a little at other people examples and the and sign got my atten...
[6 replies] Last: Now as you mentioned passing argouments by reference. a is indeed pas... (by Chervil)
Reading a part of the program (which is not a function) from another file.
 
Hi everyone, I have a program like the following: #include whatever_should_be_included int main() { whatever-1 whatever-2 whatever-3 . . . } A...
[4 replies] Last: >if you've got an issue with your code, post your code. Actually the... (by quantatanu)
Concurrency with checkpoints.
 
Checkpoint is a new(?) synchronization primitive. Idea is to mark parts of program that must be executed sequentially with checkpoints. Checkpoint is a point i...
[no replies]
Overloading operators for use on my new class
 
I have defined my own class usign template for dealing with vectors. It goes like this: template <typename any_type> class v3{ public: any_type x...
[4 replies] Last: Thank you! That is incredible, all that i needed. I will also go about... (by mcf3lmnfs)
Dijkstra Implementation in C++
 
Can anyone give me the simplest Dijkstra Algorithm's C++ Implementation?
[2 replies] Last: Perhaps this might be a little more helpful: http://lmgtfy.com/?iie=1... (by closed account 48T7M4Gy)
how to put array values in one variable ?
 
dears i have the following array: short int a = {0,2,3,4}; i want to represent it in a variable like: short int b=0234 how to do it please in c++...
[3 replies] Last: ASIDE Careful about short int b=0234 C++ treats any integer litera... (by andywestken)
Trying to eject a USB device - Windows
 
Hello, Windows 10 32 bit Qt 5.7.0 gcc v 5.3.0 I'm trying to eject a USB device. I know its drive letter and drive number. I am trying to use this rou...
[4 replies] Last: Hello JLBorges , Thanks for the link. Works fine. Just changed the ... (by alonso12)
by nlstmn
5 positive numbers
 
I am required to write a code for getting 5 positive numebrs from the user. Here is my code: cout << "Write 5 positive numbers:" << endl; int input; ...
[4 replies] Last: A mite dodgy but one's enough: #include <iostream> using namespace ... (by closed account 48T7M4Gy)
December 2016 Pages: 12345... 18
  Archived months: [nov2016] [jan2017]

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