General C++ Programming - November 2010 (Page 13)

new and delete in c++
 
Let's say I have a pointer pntr which points to an object of type Node. i.e. Node* pntr=new Node; The object node consists of a an int number and char *nam...
[3 replies] Last: When you do 'delete pntr' it will deallocate Node object but will not ... (by jusva2010)
by tomato
OpenCV texture synthesis
 
Why my code doesn't work... #include<cv.h> #include<highgui.h> #include<iostream> #include<cxcore.h> using namespace std; #define MaskSize 3 int Figu...
[no replies]
Opencv reopens window while live webcaming + another little problem
 
I have made a gui actually with 2 buttons. The first shows the output of the webcam and the second takes a picture from it and saves it! That's the code for th...
[no replies]
by Sam222
differentiating
 
can anyone help me with this write a program in c++ that finds vertex point, x and y intercepts points of a quadratic equation, a, b and c given by user..
[1 reply] : http://cplusplus.com/articles/how_to_ask/ http://en.wikipedia.org/wik... (by R0mai)
Problem with bubble sort
 
The sorting method works, I have used it without strcmp() for files of characters, but the file im sorting is array of chars, so I must use strcmp() and strcpy(...
[1 reply] : wow duh, I just swapped the argument in the if statement to be greater... (by bluetickk)
voice recognition
 
I'm looking for 3 c++ libraries that do rather specific things and I'm having trouble finding them. I would prefer them be free and open-source so I can in turn...
[5 replies] Last: Sorry for the late response, I just started school so I got swamped wi... (by tlchack5)
by rts1
Pickling and C++
 
What are the different ways to dump a C++ data structure as a Python pickle? I am aware of: (1) The PicklingTools library http://www.picklingtools.c...
[1 reply] : There is also the Boost Serialization library. (by PanGalactic)
Question about void getline (...) and structs
 
I'm finishing a homework assignment involving structs and void getline(...). I need to determine what goes in the brackets of void getline (...) but I'm stuck. ...
[1 reply] : You basically need to do what you do in getWord, except you need to lo... (by PanGalactic)
Passing string into functions
 
Let's say I have the following (full with errors) function: char* str(char* s) { char* s1=s; char* s2=strcat(s,"Hello"); return s2; } i) I b...
[6 replies] Last: Thank you very much. You have been very helpful. (by dalbir4444)
Simple Homework problem
 
I am stuck on a couple of problems from my C++ homework. 1.) Consider the following function prototype: void f1(int ); If an array has been created as ...
[7 replies] Last: Nope, wrong again. ary has type int ary has type int functi... (by jsmith)
Seeking Guidance on some Goofy Looking Code
 
So I have inherited some code that contains some odd stuff I've never seen before. I haven't been able to find any references to this code nor have I been able...
[5 replies] Last: This code (perhaps not obvious from what I posted) is not multi-thread... (by d767979)
Download Pic
 
I'm working on a program that download pictures from google and saves them on my desktop. I'm not asking for somebody to right up the entire code for this progr...
[5 replies] Last: libCURL? (by foliegame)
Test?
 
Out of boredom I made a simple tree data structure, but I'm not sure how to test it... Would anyone mind testing it for me? http://pastebin.com/zk3985yi I...
[4 replies] Last: [quote=jsmith]A programmer is someone who can design, implement, and ... (by PanGalactic)
An Array of Structs
 
I need to Prompt the user to input the name of the data file. Input the data from the file into an array of structs. Use Selection Sort to sort the data by play...
[2 replies] Last: its not running at all but no errors are coming up, it says there is a... (by ccund001)
A "strong password" program
 
The following program asks a user for a password and checks whether the password is strong or not. the strength is determined by the presence of at least one di...
[1 reply] : It is very hard to read code when it is not in [ code] tags and prope... (by Duthomhas)
OpenCV vs. "Picture Control" (MFC)
 
Hi all, I want to display my IplImages in a "Picture Control" in MFC. I get these images from a camera in a callback-function. The mainproblem is,that when I ...
[no replies]
Junk Data in array after reading file.
 
I'm having issues with reading in a file into the a 1 dimensional char array. I've used the fseek function to get the length of the file and created the char a...
[1 reply] : you forgot to put the 0 at the end of your string in 'fsrc' after you ... (by coder777)
Which is faster?
 
I'm trying to optimize my game engine's collision-checking code, and I decided that I would encapsulate it in a function. I wasn't sure if I should pass pointer...
[3 replies] Last: I agree totally with ne555. In the early days of IT computing, such op... (by sohguanh)
Using getline to read a line
 
The following is a personal program I'm working on to make it easy to put pictures from my facebook to my personal website. All it currently does is open a file...
[5 replies] Last: I FIGURE IT OUT!! lol, after a couple hours of being an idiot. I reali... (by HookAsnooK)
Creating a linked-list using a function
 
Okay so Im getting a compile error when I declare the the PersonNode function. The error is "expected constructor, destructor, or type conversion before '*' tok...
[1 reply] : move the struct PersonNode declearation part before the line u'r getti... (by xephon)
November 2010 Pages: 1... 1112131415... 21
  Archived months: [oct2010] [dec2010]

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