General C++ Programming - January 2013

How can I convert a sequence of PNGs to an MOV/AVI (has to work on Mac)
 
I have a game, which records the game. I have it currently just making a sequence of png's, but how can I convert that sequence into an MOV or AVI automatically...
[no replies]
Pointer to pointer?
 
Not sure if I'm doing this right. Do I really need to create a separate pointer to point to dynamic arrays? T* temp = new T[capacity_ * 2]; T* tIte...
[7 replies] Last: And why the cast there? operator new() is essentially malloc and re... (by closed account o1vk4iN6)
by cppgm
[PR] C++ Grandmaster Certification (www.cppgm.org)
 
We're pleased to announce the C++ Grandmaster Certification, a free online course in which you build your own C++ compiler. ========================= CUT HE...
[2 replies] Last: But it is probably a scam. (by Oria)
Searching algorithm
 
my program generates an array of random numbers. I want to then search a specific number within the array. If the number is in the array then a message apopea...
[2 replies] Last: 1) In C, indices for an array of size N go from 0 to N-1. All your loo... (by toum)
by Skynet
Help extracting nodes from binary search tree
 
I was wondering if you could assist me with my binary search tree. I have this code so far and I want to try and make it do two more things for me. I want it to...
[no replies]
map.find() efficiency
 
If I have a map: map myMap<string,vector<int>> What would the best,average, and worst case time complexity be to find a key, and then iterate through the ...
[2 replies] Last: It will be come O( log n ) + O( m ) ( map.find ) + ( search trough ... (by rmxhaha)
by Huck
Multiple condition for loop efficiency
 
Hi all, Beginner question here. I was wondering if a loop like this (adding i + j to the sum): #include <iostream> using namespace std; int main(int ...
[5 replies] Last: As you gain experience, you will learn that simple, transparent, easi... (by Disch)
destructor failure
 
on return from main the destructor for this class fails ~25% of the time with inputted command line args always being the same . here is abstraction with only ...
[8 replies] Last: There are only a few ways I can imagine delete failing. 1) You are ... (by Disch)
alternative line
 
can someone tell me what can i use altenatively to prevent from using lines like this " std::to_string(total_amount) " instead of using std:: what should i p...
[2 replies] Last: Maybe you searching info about this: http://www.cplusplus.com/doc/tuto... (by MiiNiPaa)
by LB
How do C++ streams behave polymorphically?
 
How is it that I can pass any stringstream, fstream, cout/cin, etc. as a std::iostream/std::istream/std::ostream and it will work as if it is polymorphic? A com...
[14 replies] Last: This is a good beginner's tutorial: http://www.mr-edd.co.uk/blog/begin... (by JLBorges)
by Hucaru
Collision detection
 
I have recently started to learn SFML and decided to make a brick breaker game to practice with. I have managed to get a paddle, ball and bricks to appear. I ca...
[13 replies] Last: I have solved the issue fun2code you are right in the blocks draw func... (by Hucaru)
2dimensional array
 
I need to make a program that will input for the salary per 7days in a week.. the output must be like this : Week 1 Sunday:20 Monday: 100 Tuesday: 200 Wednesda...
[1 reply] : /Sigh Please, tell the name of courses you have this assigment for. An... (by MiiNiPaa)
by arms4
function and array!?
 
Well i not really sure how to use function so here is my question. I got and array and i declared it in a function but then my main program got code that requ...
[3 replies] Last: thx! i got it now (by arms4)
Guys a little help here please
 
i want to write a function which take an intiger and return the number of the of digits in it i.e int i = 123456 func(i) { some code } output the...
[9 replies] Last: give me a example of code please (by Sarmadas)
by Sucho
Replacementr Of getch()
 
Well I've been using Turbo C++ for quite a while. Then after finding out its quite obsolete, i switched to GCC compiler with Code::Blocks IDE. I recently found ...
[8 replies] Last: Thanks, It worked! (by Sucho)
Sorting array
 
I want to implement a function into the code below that sorts the user defined amount of random numbers and then sorts them in ascending order. #include <ios...
[5 replies] Last: You should have told that before dude. Selection sort is easier but in... (by Sucho)
by Sucho
str.length() is always giving 0
 
In this code- #include <iostream> #include<cstdlib> #include<cstring> #include<conio.h> int main() { std::string a=""; char c; for(int i=0;i<1000...
[8 replies] Last: Yup, just found out that strcmp() returns 0 when the strings are same.... (by Sucho)
by Smac89
How to class
 
So I have this code that is supposed to read from a file. The file depicts a city (sort of) with each item in the file representing a city block. And depending ...
[1 reply] : Are you sure you're not supposed to use the std::map to store your ins... (by ajh32)
Accessing value of map when it's a vector
 
I have the following map: myMap<string,vector<int>> . I now want to look through my map to see if a key exists and if it does, retrieve one of the int values f...
[2 replies] Last: The solution to this was posted by JLBorges in a later post - anothe... (by TheIdeasMan)
Looking for tree string search program
 
This is not a homework assignment. Would like this for my own use. I have 80,675 Files, 8,213 SubFolders. I would like to search each file for a string, ...
[2 replies] Last: Thx, I think you put me on the right path. Will read on that more tom... (by SamuelAdams)
January 2013 Pages: 123... 36
  Archived months: [dec2012] [feb2013]

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