General C++ Programming - September 2011 (Page 19)

by jorgen
Array interfering where it shouldn't
 
I have a program where doing something to an array F changes another array D while to my eye it shouldn't matter to D at all. Here is the relevant code: usi...
[2 replies] Last: Thanks a lot! In line 22, instead of F[j*s+k]=... it should have been ... (by jorgen)
allocate memory for 2d array
 
hi, i have to allocate memory for 2d array so i can have view like .............. | 1st column | 2nd column| 3rd column . . . . . . . -------------------...
[6 replies] Last: True, haven't used multidimensional arrays in ages... and neither arra... (by hanst99)
Video Editing?
 
I am using OpenCV and trying to apply a Gaussian Blur to an incoming video stream. I basically use cvQueryFrame to remove a frame, blur it and display the frame...
[1 reply] : Normally you'd ask this kind of specific question on the forums (or ne... (by hanst99)
collision detection!
 
anybody have luck finding a formula to see if 2 rectangles intersept? mine doesnt work if((r1.x+r1.length < r2.x) || (r2.x+r2.length < r1.x) || (r1.y+r1.w...
[4 replies] Last: If the rectangles are axis aligned, it's simple: /* assuming Rectan... (by hanst99)
Checking for null characters in the middle of a character sequence
 
Hi Guys, Im having a text file which its contents looks like following: Abbcasacacasca NUL Abbcasacacasca I tried to read from the line but it s...
[4 replies] Last: How are you trying to read the line? (by Galik)
Rectangle interception! HELP!
 
so im writing a program to test if rectangles intersect... im given x,y,width and length of each rectangle.. so far i have this calculation but in some cases it...
[6 replies] Last: LOL! Duoas, that is probably the most thoughtful and selfless post I ... (by webJose)
Creating a Tokenizer with STL Strings
 
Hey, I am working on a small program where I am supposed to create a tokenizer that allows the user to pick the delimiter. I am suppsed to use linked lists ...
[1 reply] : Try the global getline() function specifying the delimeter yourself. ... (by webJose)
trouble deleting at array of arrays
 
I have an array of arrays. When needed I allocate as shown as follows. With this allocation method, I am able to access the values using normal array notation...
[6 replies] Last: Thanks guys for the help. I went back to if (histogram != 0) { ... (by closed account S8hvC542)
Pi program calculating pi = 3?
 
My friend and I are way ahead in our computer programming class so we thought it would be fun to calculate pi. Little did we know we would spend the whole perio...
[3 replies] Last: Using == and != with floating point operands is in general a really ba... (by helios)
Read text file from url to string?
 
I have been attempting to find a way to read a url (It's a dropbox link) of a text document to a string, I have looked at libcurl and have absolutely no idea ho...
[no replies]
Where is my error in this?
 
#include <iostream> using namespace std; class Write{ public: Write(char*); void* ret(){return a;} private: char *a; ...
[1 reply] : I would point the finger at line 17, the std::cout statement. You're... (by closed account zb0S216C)
need std::map for this question
 
First Of all I would like to thank Michael Thomas Greer (Duoas ) for his endless help in the forum and to me specially . I have like this in a file1.txt ...
[no replies]
by wtf
debugging my integer class
 
I have a problem my integer class works well enough incrementing an integer from 0 up to 19, but after that it goes from 19 to 110. #include <iostream> #in...
[6 replies] Last: I think this is the one you are asking for: http://cplusplus.com/forum... (by closed account D80DSL3A)
This is a Challenging Question, come and try to solve it together, we need to use std::map, is there anyone to help
 
Hello Chaps, This is a Challenging Question, come and try to solve it We may need std::map ? feel free to help I have like this in a file1.txt I have ...
[6 replies] Last: sorry mate, no offense I am just telling u that counter does not solve... (by john1984)
Mutually exclusive bitflags
 
How can you make bitflags mutually exclusive? I have a client/server program that sends files. The client and server are the same program, run in one of two mod...
[2 replies] Last: That was how I thought it worked, thank you for confirming. (by chrisname)
open two console from c++ program
 
Hello, i wrting c++ program in which i want to open two console so that one console have one function runing and other function have second function runing ...
[5 replies] Last: On Windows, there are functions for creating a new console, but I don'... (by chrisname)
plotting graph
 
Hi , I have an array like this 6,5 12,9 18,11 I need to plot 'B' at all the co-ordinates mentioned above, for all other co-ordinates I need to plot'z'. cou...
[4 replies] Last: Here is a program that does some of what you require, to get you start... (by whitenite1)
Writing a file in collmns
 
hi everyone, suppose i have data stored in some variable say, a . also, i have a file which has already 2 columns X 10 rows of text in it. If i want to write...
[2 replies] Last: Effectively, the file is stored on the hard drive as a single long lin... (by Moschops)
by glst
good C++ course for UK engineer?
 
I have a good first degree in engineering and experienced in some programming (Matlab). I want to work in C++ and want to hear any recommendations as to a suita...
[4 replies] Last: I personally think Stroustroup is good if you already have practice in... (by hanst99)
please answer
 
suppose we have this class class A { int k; public: A(int p=0):k(p) {} }; is there any difference between A a and A a(); the " k " may be ...
[5 replies] Last: And that's exactly why we have the new initializer syntax with C++11. (by hanst99)
September 2011 Pages: 1... 1718192021... 31
  Archived months: [aug2011] [oct2011]

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