General C++ Programming - February 2017 (Page 7)

PPP2 Chapter 10 Exercise 6 - "vector iterator not incrementable"?
 
I'm getting a debug assertion error when I try to run my implementation of the Roman_int class exercise program. The debug assertion error is as I put in the t...
[7 replies] Last: I guess I already fixed that. cout << "Roman numeral " << r << " as a... (by DragonOsman)
by Krasit
Prohibiting the snake from going through itself
 
I'm making a snake game in the command prompt. The basics are close to be finished. I've created the area where the snake can move using a 2D array. I move the ...
[2 replies] Last: ah. You have to ignore input that corresponds to the opposite directi... (by jonnin)
Looking to exchange C++ knowledge
 
Hello, This might be a bit off topic, but am looking for someone who has several years of C++ and who wants to share/exchange some of his experience with C++. S...
[no replies]
PPP2 Chapter 10 Reading example code operator<< (1,2,3)
 
I mainly need help with the operator<< in the temperature file I/O code in Chapter 10 Section 10.11.2 that we have to define the print_year() function for. And...
[43 replies] Last: The problem in there was that that the loop was starting from 1 instea... (by DragonOsman)
How to order a vector?
 
I have read in a file and it counts the frequencey of the lettters and grammar used as I wanted. But this waa using a map which I can't order and so I have trie...
[9 replies] Last: sorry for jumping in late: But this waa using a map which I can't or... (by gunnerfunner)
Unresolved externals despite having function definitions
 
Hey I am getting into a really annoying issue that keeps bugging me. I was just working on a project, and I added an additional function to my class, and sta...
[2 replies] Last: http://www.cplusplus.com/forum/general/113904/ (by ne555)
how to determine primary network adapter
 
hello i want determine primary network adapter and another network adapter as VMWare and etc. how?
[no replies]
Resize canvas using pointer
 
Ok so First i have to create a Canvas using this fucntion char ** allocate_canvas(int width, int height) { char** arr = new char* ; for (int i = 0; i < widt...
[2 replies] Last: Line 15 of canvas.cpp should be delete C ; since C is itself an ar... (by dhayden)
Resize canvas
 
Ok so First i have to create a Canvas using this fucntion char ** allocate_canvas(int width, int height) { char** arr = new char* ; for (int i = 0; i <...
[1 reply] : you have a few options. 1) you can create a new ** and allocate to th... (by jonnin)
Nested blocks variable scopes
 
Is there any way to access the rest of the ( s ) variables in the following code from the inner most block? #include <iostream> using namespace std; ...
[1 reply] : No, there's no way without declaring more stuff or renaming variables.... (by helios)
Help with C++ Calendar!
 
I have a small problem with my code for my calendar. most of the months displayed have the right start days but are to spaced out due to the setw that is needed...
[3 replies] Last: @oatmeal678 I'll be glad to answer your questions, but first you'll h... (by whitenite1)
Basic program help
 
I'm new to c++ programming and I am in Computer Science. I was wanting to figure out why my previous assignment kept giving me an unhandled exception. Any help ...
[1 reply] : Do you know when you get the unhandled exception? A debugger would al... (by doug4)
what means: ^=
 
Hi all! In a stoustrup's file (stings) I found this: for (int i = 1; i<max; i++) h ^= s.read(i)>>1; // unchecked access to s I should like somebod...
[3 replies] Last: Many thanks to you two ! (by sylvain)
by vaynex
Refactoring code, to make it cleaner
 
I have a section of code that i am looking to refactor as in each conditional statement it is repeating lines of code that is used in another conditional statem...
[2 replies] Last: Another option, building on JLBorges's idea of an init() function: bo... (by dhayden)
AES 128 source code help
 
Hi, I'm still a beginner in coding, I need block cipher source code for my research paper where I need to get the run time for mode of operation, I already find...
[no replies]
Issue terminating for loop on conditional
 
I am having an issue trying to get a loop to terminate when there is not enough data in the array. Source file is as follows: 6,9 3,5 4,5 -1 4,6 8,...
[1 reply] : comments within the code, shout if something's unclear: #include <ios... (by gunnerfunner)
Matrix Input Redirection
 
Hi Guys, I am having trouble with a Matrix problem. I want to only specify the amount of columns before asking the user to input their vectors, and using inp...
[2 replies] Last: vector<int> v; int numrows = 0; int x; while(not done reading columns... (by jonnin)
Contiguous Polymorphic Memory Storage (1,2)
 
I am creating a program that needs extremely high performance as I need it to update a huge amount if data in an extremely short period of time. I have a ba...
[31 replies] Last: I pretty much am, but I am using the preallocated pool memory and usin... (by lordseanington)
Looping objects into Vector or Array
 
I have all these objects of type fraction over 100. Is there a way I can insert them into the vector with a loop? The below code inserts the 1st object f1, b...
[4 replies] Last: Thanks helios, No there isn't, I created these Fractions then realize... (by ssoffel)
error extracting resource from EXE file
 
Hello i'm trying to extract one Exe file using windows Api and Qt like framework. But ever extract me my file and show me again new error's again. The code is t...
[no replies]
February 2017 Pages: 1... 56789... 16
  Archived months: [jan2017] [mar2017]

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