General C++ Programming - April 2011 (Page 10)

Problem in printing text file!
 
Hi there, There is my code: void printfile(const list<char> &myList) { list<char>::const_iterator itr; for (itr = myList.begin(); itr != myList...
[3 replies] Last: Thanks both of you. (by alibaba1988)
nevermind. please delete.
 
i don't know how to delete my post!
[4 replies] Last: http://cplusplus.com/forum/articles/40179/ (by Mathhead200)
by chaman
why string argument give error
 
When I send str from addvector from main program, it gives segment fault error, I use gcc-4.4.5. how can i solve:- #include<stdio.h> #include<string> using...
[1 reply] : //no return type addvector(string str ) { } //did you meen ... (by Mathhead200)
by KaiL
OpenCV Lucas–Kanade Optical Flow Method
 
I want to use this method like the person in this youtube video but I have no idea how. http://www.youtube.com/watch?v=4TYJGvCeeC4&feature=related So could any...
[1 reply] : http://en.wikipedia.org/wiki/Lucas%E2%80%93Kanade_Optical_Flow_Method ... (by webJose)
I need help with adding arrays/vectors
 
This is what I have. Everything works the way it is suppose to but the addition of the arrays/vectors are not right. The DOS prompt is at the bottom with an exp...
[1 reply] : Nevermind... I got it. I changed the end of the it from: result = ... (by confusion)
Source Code Problem
 
...
[1 reply] : See http://www.cplusplus.com/reference/clibrary/cstdlib/itoa/. itoa()... (by webJose)
Boost Circular Buffer Question
 
Hi! I have a vector of strings called citiesvector. For each string, I want to create a boost circular buffer named for that string. I tried the following code,...
[1 reply] : No, you can't directly create variable names at runtime. You can make... (by jsmith)
binary tree
 
You are given a binary tree in which each node contains a value. Design an algorithm to print all paths which sum up to that value. Note that it can be any path...
[4 replies] Last: it can be anywhere in the tree (by jackel7777)
by Micro
Going over the board + layout issue
 
Hi there, I am wondering what I am doing wrong ss when a user inputs anything on the 10th row..the 'X' char is misplaced :s Also, I cannot seem to limit the ...
[no replies]
Filling a Deque From a Vector
 
Hi, I have a quick question about filling a stl deque from a stl vector. I would appreciate it if someone could tell me what I'm doing wrong in this snippet of ...
[2 replies] Last: Wow, that's very cool. Thanks very much, it works perfectly. (by siegel14159265)
how to create a C++ program using void
 
i have a C++ program but i created it using int main() it turns out now that my professor wants it in void main() does the structure stay the came or chan...
[9 replies] Last: Use the tutorials on this website, they're great for beginners. (by mobat)
[UDP] redirect to IP
 
edit: I resolve the problem.
[2 replies] Last: I want to redirect an IP that is connecting to my ip, but that ip is ... (by mircea213)
by Zap
what is " *this " ?
 
A few years ago I created a header file to work with fractions. Looking over it again, there are a few parts i don't fully understand what they are doing. ...
[8 replies] Last: thanks that definitely cleans things up. I've removed the extra parts,... (by Zap)
by ales88
'vector' was not declared in this scope
 
Linux GCC says that in line 10 there's the error: 'vector' was not declared in this scope. An extract of the source code is the following (after having included...
[2 replies] Last: The code below compiles without error. If I had to guess, I'd say tha... (by Moschops)
How to Make a Calculator in Visual C++
 
http://www.youtube.com/watch?v=dMQU_sDAmMw A tutorial I made. Please comment.
[no replies]
Function Users
 
Is there any way to, in a function, refer to the thing that called the function? Such as: #include <iostream> #include <string> #include <userrefer> ...
[10 replies] Last: Thanks guys! But what if: class B { public: std::string... (by KrahkaMaster)
data not writing to struct
 
Hello, I have an issue with a structure that is being used to store an encrypted string value. Apparently, for some unknown reason, the code is not storing the ...
[no replies]
Delete funktion
 
Hello! Just found out that in a school assignment i did a while back,my remove function wasnt correct,but i dont see the error tho void Handler::remove(s...
[2 replies] Last: Allrighty,thank you. (by menopaws)
sorting vector problem
 
Hey guys, I am new to using vectors and am having trouble using my quicksort to sort a vector. The quicksort I have works perfect on arrays. My problem ...
[9 replies] Last: template <class dType> void quicksort(dType &temp, int l, int r) ... (by closed account zwA4jE8b)
by shiuma
operator== for struct
 
Hi! I've a problem to define the operator == for the follow struct: struct t_time { /** * from 0 to 59. */ public: byte min; /** * fro...
[2 replies] Last: Thank you! (by shiuma)
April 2011 Pages: 1... 89101112... 37
  Archived months: [mar2011] [may2011]

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