General C++ Programming - August 2011 (Page 12)

Stack Corruption Error
 
I had set up SFML today and begun doing though the documentation on the sfml-dev site. I was trying out the Graphical Library. Now here is my code: #include...
[4 replies] Last: I was using them in VS Professional 2010. I hadn't seen your post whe... (by Nisheeth)
by VilleA
Global Object / Other solutions question
 
Hi, I am stuck again. This time the issue is with the need of global object. This is the general idea of the program: Main -> Window -> Drawing Area. ...
[2 replies] Last: Doing it in one thread is hard due to the GTKmm. Or I did not unders... (by VilleA)
by AllanC
What im doing wrong???
 
1
[no replies]
by AllanC
Help please!!!!!
 
1. Chemical Engineer and programming, yeah right!!!! Tell me what you know about thermals!!! I dont care about this website. Im closing my account.
[no replies]
c++ networking
 
hi, i have been programming c++ for a few years now and i would like to start learning networking. What are some good libraries for c++ sockets/networking?...
[1 reply] : I recommend "Beej's Guide to Network Programming". Lots of useful info... (by vince1027)
What is wrong?
 
//using visual studio 2010 express #include <iostream> #include <cstdlib> #include <time.h> using namespace std; int easygame(){ int enemyHealt...
[2 replies] Last: Thank you, but I have another problem. void hardgame(int playerHealt... (by inform880)
screen update time with system.draw?
 
Hi there my first post :) ..To cut to the chase, ultimately my question is when you execute some lines of code to display lets say a bitmap image inside a recta...
[no replies]
Ideas for improving my tokenize function.
 
I wrote this function for a calculator a few months ago. Now, I'm trying to write an interpreter and want to reuse this lexer(and 1st level parser combined). ...
[3 replies] Last: There are certain rules for your tokens that can be written somehow. S... (by hamsterman)
memcpy efficiency
 
I have an HD bitmap image in memory, 1920x1080 pixels, 4 bytes each pixel. I have two options for my algorithm: 1. memcpy the alternating 1080 lines (half...
[2 replies] Last: 540 moves would be faster, because the total amount is smaller. (by rapidcoder)
by alhanz
Limit the number of threading being threaded
 
Hey guys I'm trying to do threading in to solve a maze algorithm. The catch is this, the max "life" of the thread is 3. So if the thread hit a danger spot, l...
[1 reply] : Consider using the C++11 (formerly 0x) thread objects. With that you c... (by manasij7479)
by shenh
Multiple inherience with same function name
 
Dear All, I have a child class implementing two interfaces. Each interface contains a common function name. A sample code is as follow: class IClass1 {...
[3 replies] Last: Your first implementation does not compile with gcc. If you figure out... (by mackabee)
Strange Exception Problem
 
Hey all. Weird problem. Before my program gets to the first line of main() it throws an exception, which is apparently handled and then everything appears to go...
[4 replies] Last: What if you set a breakpoint at the start of the function? Can you see... (by helios)
When to use private inheritance and when composition ?
 
Hi guys , I'm wondering when should I use private inheritance and when to use Composition. From my understanding , private inheritance seals the Derived class ...
[1 reply] : private inheritance is a IS-IMPLEMENTED-IN-TERMS-OF relationship. ... (by closed account 1vRz3TCk)
by duma
square wave generator
 
Square wave = sign(sinusoidal wave) So then why isn't the following code creating a square wave: int sgn(double d){ if (d>=0) d=1; else d=-1; retur...
[8 replies] Last: Yes thanks for all your help guys. The solution: amplitude_scale * sgn... (by duma)
File manipulation
 
hello ive been doing this program and i can't seem to figure out how to delete a record file. like if you delete record 2 from a 4 records database, record 3 s...
[2 replies] Last: I'm sorry, this is my first time to use this forum so i don't know how... (by averasjr)
Code Efficiency
 
Hey guys, The below working function returns the sum of all Fibonacci sequence numbers between 0 and a given number. For example the sum of all Fibonacci s...
[12 replies] Last: What do you mean? Mine compiles to the same thing, just without the ex... (by JellyFox)
Difference between an array and an associative array
 
Here's my understanding of an associative array: The values are allotted to array slots based on some function. In order words, integer 560 would be allotted at...
[1 reply] : The difference is that arrays are indexed by integers, whereas associa... (by helios)
very simple question about opencv2.3
 
Hello, I am trying to read an image by using imread function as in the link (http://opencv.itseez.com/doc/tutorials/introduction/display_image/display_image.ht...
[2 replies] Last: You use incorrect header files. You should use #include <opencv2/cor... (by alekcac)
by Jonc
OpenCV, understanding iplimage
 
I'm just added OpenCV (no previous experience with it) to a project of mine to help me retrieve frames from the webcamera. It works well and everything, but I c...
[no replies]
difference between array and pointer storage
 
char array_place = "don't panic"; char* ptr_place = "don't panic"; here "don't panic" will be stored in the first memory location of the array array_place ...
[4 replies] Last: you can refer books http://www.cplusplus.com/articles/GLzyhbRD/ refer... (by santhosh3749)
August 2011 Pages: 1... 1011121314... 29
  Archived months: [jul2011] [sep2011]

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