General C++ Programming - September 2010 (Page 12)

by viddi
Restricting one class not create object
 
Hi, i am a beginner in c++ programming. i have 3 independent classes A,B,C.i do not want B to create A's object but C can create A's object.how to implement t...
[8 replies] Last: Yes, they are. I put the keyword there for emphasis. (by m4ster r0shi)
Succesive calls to cin fail
 
I have a C++ program that calls for user input (integer) at two different points in the program (cin >> variable1, cin >> variable2). The first input is success...
[11 replies] Last: Kempofighter; I agree that this is not the most sophisticated desig... (by jordon Hirshon)
by SD123
Program to display this...
 
................................... * ...................................* * ..................................* * * .................................* * * *...
[14 replies] Last: @wtf, http://en.wikipedia.org/wiki/Brainfuck (by chrisname)
static counter and = operator
 
Im working on a class that has four different types. In the class i have static integers to act as a counter, so that each time an instance of the class is cre...
[2 replies] Last: Yeah i tried to put that as clearly as possible but i dont think i rea... (by grenoble12)
by upad
book catalog
 
Hi, I've been working on this problem for a while and am unable to get to the right solution. Can someone help me create a Book Catalog that would contain a ...
[2 replies] Last: all of your code must be within the scope of a function. everything y... (by wtf)
Object Composition
 
Hey guys, i have two classes, viz: Connection class in file "Connection.h" and Statement class in file "Statement.h" Connection class references Statement, ...
[2 replies] Last: hello marembo, well ' Sql Statement' is different from 'Statement'.... (by coder777)
Segmentation fault with fread while loading WAV file
 
Hi, I am making a basic WAV file loader in order to play basic sound in my program. I have successfully read the entire header with multiple calls to fread, ...
[7 replies] Last: Ok, I should really go to sleep I suppose ! Eventually it worked an... (by teupoui)
Using a pointer to copy construct
 
Hey all, I'm trying to debug a memory leak on close of someone else's code, and I wondered if it might be occurring because of the way they have their copy cons...
[4 replies] Last: hello wee bull, there're only pointers. at your example only new wi... (by coder777)
Test code
 
Can someone please tell me which will be the test code of this program? Code class statistic{ double * store; int noOfData; public: stati...
[7 replies] Last: yes, it does. Check out boost.test. EDIT: http://www.boost.org/doc... (by jsmith)
draw bitmap to screen
 
hello, i've been looking for how to do this, all over the internet for the past two days and i think its about time to ask for some help im trying to draw a...
[18 replies] Last: i figered it out !! i had a problem with 1 of my arguments here is t... (by mahertamim)
by MystX
Pthread problem.
 
Hi everyone, my first post here so bear with me. I am looking for some help with my progrm using pthread. Basically, here's my code: class A { public: ...
[18 replies] Last: Ok, I overlooked the noobest mistake of them all. My routine that cre... (by MystX)
How can we manipulate imported audios
 
we have tried using the available source codes in the web in playing sound files... but we want to 'scramble' the sound, in the way that it looks like some s...
[no replies]
by chee
c++ calling link lists in main
 
i want to convert this main to just a series of random numbers that i can call in a function above the main. this is some of the code in the main, which i us...
[4 replies] Last: this is c++ I don't see any C++ code here other than the use of co... (by AbstractionAnon)
Ask about protected keyword
 
Please help me. I read many books and they talk: protected member can be accessed from member in same class, friend of own class, derivative class and friend of...
[10 replies] Last: void showpowerme(Rectangle* p){ cout<<p->w; } Not to in... (by sohguanh)
by upad
error in code
 
Hi, I'm a beginner in c++ programming and am unable to figure out what the following error message means and how to solve it. I'm posting both the code as well...
[2 replies] Last: thanks much, just wasn't looking at the code with the right eye. ... (by upad)
Anything wrong with this?
 
Hello, I'm trying to send a list of songnames to a client i built. Everything compiles fine, it even sends the first filename right. When the server begins to...
[3 replies] Last: Also, your strncpy() will be a problem if the length fname is >= 200. ... (by kooth)
by DJWulf
Text Based Texas Hold'em Poker C++
 
Hi, I am new to this site and was referred to this site by a friend. Part of my college homework is to make a text based Texas Hold'em Poker game using C++....
[4 replies] Last: ty, every little bit helps (by DJWulf)
mpi_comm_spawn
 
Dear everybody, Does anybody know about mpi_comm_spawn? if so, please let me know. Thanks in advance
[2 replies] Last: I have already google it, but the problem is that am trying same examp... (by abdallahijazi)
C++ compiler and OOP
 
Hi, I have two questions: 1) how does a compiler handle programs, I mean suppose I have a program which makes a GUI, after I have executed the program and the...
[2 replies] Last: does the compiler keep on going repeatedly 1) That is an interp... (by EverBeginner)
auto_ptr transfer of ownership behavior
 
Hello. I apologize if this question has been asked before. Consider the following code: #include <iostream> #include <memory> using namespace std; ...
[7 replies] Last: Achhhhh. print should have been virtual. My mistake. Never mind. (by jbarnesweb)
September 2010 Pages: 1... 1011121314... 20
  Archived months: [aug2010] [oct2010]

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