General C++ Programming - October 2014 (Page 18)

want some good quick ,easy to follow reference
 
Can someone point me to a good quick ,easy to follow reference with examples on the following- 1. memory management in c and c++ 2. operator overloading in ...
[3 replies] Last: No such thing as "C++ in ten seconds"... (by tmason)
by tmason
Weird "HEAP CORRUPTION DETECTED: after Normal block" error when attempting to delete array...
 
Hello, I posted a yesterday about creating and deleting arrays but my example program worked fine when corrected while the problem I have with my larger progra...
[3 replies] Last: At first glance at the code given, I see nothing wrong. It must be a c... (by Ganado)
REGEX
 
Hi every one i have problem with regex file input.txt have structure like this: [A-Z]o Hello everyone! I am John #include <iostream> #include ...
[no replies]
by yo2xia
Residuals Sum of Squares calculation of regression in C++ Eigen
 
I want to work out RSS of Matrix Formulation of Multiple Regression, and Y=Xb+e; Here is the code i program in C++, but error occurs. Any help will be very appr...
[no replies]
by tmason
Simple array with access violation errors.
 
Hello, I have a rather large project which uses a float array for OpenGL but I believe I am reproducing the problem with a simple example below. Essential...
[2 replies] Last: You are right, changing that line allowed the array to be created and ... (by tmason)
header file help
 
if I have this in header file: can I do this in the .cpp file?:
[16 replies] Last: I'm not sure exactly what you are trying to do since you removed your ... (by giblit)
BitMaps in the console
 
Before anyone says anything: YES this is very out-dated code YES i am aware that there are MUCH easier ways of doing this and YES i am awa...
[no replies]
Overloading Operator+ won't take both sides
 
So I'm trying to add two objects of a class i made called NaturalNumber, however when i try to add two NaturalNumber's together, it will replace one of the Natr...
[2 replies] Last: Main.cpp #include <iostream> #include <string> #include "Classes.h" u... (by Kerchnasty)
by tmason
"Vector Subscript Out of Range" even with item in container...
 
Hello, I will try my best to describe this problem I am having because I am not sure if I can reproduce the error in a small code example as this is part of ...
[4 replies] Last: I think I found the issue; it has to do with something completely diff... (by tmason)
Creating a 2D array within a class using a constant
 
I've been given specific instructions to create an array inside a Class Matrix using a constant n. This is my class but I am getting errors. I thought that mayb...
[4 replies] Last: Thanks for the help. I ended up using Keene's approach until I can get... (by Adam223)
Display a pattern using loops
 
I have spent at least an hour trying to display this pattern and I am not getting anywhere. Pattern C 1 21 321 4321 54321 654321 This is as far a...
[4 replies] Last: Do the loop backward: for (int j = i; j > 0 ; --j) (by MiiNiPaa)
Urgent C++ string related
 
Alright I was able to code a factor that starts at 1 and goes up the length of the string: uint64_t hash_bytes(const char* bytes, size_t length) { uint64_t...
[1 reply] : Do you mean, replace line 7 with this? uint64_t factor = length - i;... (by doug4)
by segav
Adding 2 large integers as a list
 
I'm supposed to write a program that would add 2 integers of up to 300 digits. I implemented the use of an array list with a header file, but I keep getting err...
[no replies]
Need help! (for loops/random number generator)
 
I'm having trouble with running for loops inside for loops. For my assignment I have a bunch of calculations that need to be ran a certain amount of times (spec...
[no replies]
Inheritance
 
//Big.h class Big{ private: int k; public: //.... .... }; // Small.h class Small: public Big { public: ...... ..... }; In class Sm...
[3 replies] Last: Can you add accessor functions to the base class? ... protected: ... (by doug4)
LNK2019 while linking OpenGL program
 
I am following an OpenGL tutorial on https://open.gl/ . I am already stuck on creating context. I am using SFML 2.1 to create my context. My code is currently:...
[4 replies] Last: I am sorry for posting this on an old topic, but now I am trying to ma... (by memberfunction)
by begha
Unique pointers with derived classes
 
This may sound confusing, but here goes. So I have two inferfaces, intoLogic and intoView, both of which are abstract classes. Both of them are derived to two c...
[4 replies] Last: Yes, that is what I said. =P (by Disch)
Output
 
#include <iostream> int main() { for( int=1; i<=6; i++) { for ( int j=5; j>=1; j--) cout<< i+j; cout<< "\n"; } re...
[1 reply] : #include <iostream> int main() { for( int i = 1; i <= 6; ++i ) ... (by JLBorges)
Please help with writing a program?
 
Hii, I'm really bad at programming so please help me to write this program: "A program that reads 100 numbers and calculate their average - should print numb...
[9 replies] Last: aaaah~~ right..!!! didn`t notice that :o i was in a hurry!! keskive... (by deepestblue)
by koko82
Pointers of Pointers
 
Hi All, I am a bit of starter on C++ would appreciate some advise/guidance on pointers. I am working through the Jumping into C++ but one question has confused...
[12 replies] Last: Thanks for the help, but not come across casts yet hmm. Bit more study... (by koko82)
October 2014 Pages: 1... 1617181920... 38
  Archived months: [sep2014] [nov2014]

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