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

Print number in diagonal format in matrix
 
Hi. I tried to print number in matrix in following format but could not reach the solution .. does anyone have idea Ex. I have matrix a 3] = { 1 ,...
[1 reply] : DUPLICATE POST: http://www.cplusplus.com/forum/general/27361/ (by Galik)
new operator lifetime
 
A class has a method that initializes one of it's member pointers with the new operator. Will it be deallocated when the class is deallocated or only when the e...
[2 replies] Last: As Disch mentioned, the memory allocated for the data member will not ... (by herojeett)
Running Program
 
I was wondering how to make a program open another program.
[13 replies] Last: If you post the code you have and post what platform you want to run i... (by kbw)
what if assignning -1 to an unsigned type
 
deal all: i saw this static const size_t npos = -1; in the string reference,yet because size_t is an unsigned integral type,i do know if it is safe to do so,...
[6 replies] Last: thanks, i see what you mean. (by sysabod)
by janpan
Adding Polynomials problem
 
Hi guys, I have been working on an assignment we have at the University. Basically , you have 2 classes: class Polynomial and class Term. The Polynomia...
[1 reply] : Look at the STL reference on this site (http://www.cplusplus.com/refer... (by helios)
How to start another program with c++.
 
I was wondering how to start a program with c++. I don't mean open a file for editing but make it so I can set a variable to open Internet Explorer, as an exam...
[1 reply] : http://www.cplusplus.com/forum/general/27152/ (by kbw)
When do you use enumerated type?
 
I am curious, when do you ever use this data type? I need some examples because I don't know when should I be "encourage" to use it. I know how to write it ...
[6 replies] Last: Enumerations are mainly used for states (like in the example given abo... (by Kyon)
How to go out of the catch body block?
 
funct{....catch{...from here}; if{...}; to here: retrun 0;}
[3 replies] Last: what? ps: you should use a do-while there (by Bazzy)
while(true)
 
What does that do? I know what the while loop is; you put the condition in parentheses and it loops until the condition is false, but that's just the problem he...
[1 reply] : true is never false, so the loop never exits. It's an infinite loop. ... (by Disch)
Confused about pointers??????????
 
HI everyone, I just want to know consequeces of following code, is it norma?? Or do it will lead to memory leak??? char *RTInfo; ...........//do some stuf...
[4 replies] Last: That is true, assuming there is no 'new' in the //do some stuffs secti... (by closed account 1yR4jE8b)
by indr
setprecision and fixed
 
#include<iostream> #inlcude<iomanip> using namespcae std; int main() { float a=3.14; cout<<fixed<<setprecision(4)<<a; } if i execute the above code i am...
[6 replies] Last: hi , i am sorry..i didnt notice that i misspelled namespace while pos... (by indr)
by techm
Regular expression
 
#include <iostream> Can anybody please help me to extract till "/" or "0x2f" into b(string) ?? Please do the needful. #include <pcrecpp.h> using nam...
[6 replies] Last: Regular expressions are overkill for this. Just search the input strin... (by helios)
cin >> leaves extra new line in buffer?
 
I switched to using cin >> instead of getchar in my program thinking it automatically deals with the annoying extra newline char that getchar leaves in the buff...
[3 replies] Last: Duaos meant stringstream up there I believe. (by firedraco)
Using CreateProcess()
 
How do I open a program with CreateProcess()? I have spent hours googleing and cannot find any understandable explanation. And not to be rude, but either hel...
[1 reply] : The documentation at MSDN is very complete, including examples. http:... (by Duthomhas)
by Wander
SFML Splitting
 
I'm trying to make a map with SFML. I want to have the map on one side of the window and an input/output section on the other side of the window. Is there a com...
[8 replies] Last: Okay Ill go check it out. (by Wander)
Store data of multiple types
 
Dear forum, I have a question concerning the storage of multiple types of data. I have an abstract class Shape and multiple concrete classes who derive from ...
[8 replies] Last: Indeed, that did the trick! Thank you all for your replies, you al... (by PascalM123)
by ozair
a pointer question
 
take a look at this program int main() { int i, *pi; float f, *pf; i=1024; pi=&i; f=1024; pf=&f; cout << i << " " << f << ...
[1 reply] : Because integers and floats are stored in completely different formats... (by guestgulkan)
calling parent methods
 
For some reason I'm getting a compiler error when trying to call a method defined in a parent class from a child object. I keep getting: error: request for ...
[2 replies] Last: Thank you. Yeah that's really really annoying. (by ischuldt)
by jas
project
 
Can anyone post the source code for a program on scientific calculator without graphics....i will be very thankful and its urgent..........
[3 replies] Last: sounds like someone forgot to do their school project and the deadline... (by Disch)
Filestreaming Error
 
Hey everyone, I was wondering if someone could take a quick look at my code because I have an error somewhere and I'm not sure exactly whats wrong with my code,...
[4 replies] Last: Yea it worked thanks alot for help! (by artilluer)
August 2010 Pages: 1... 1011121314... 20
  Archived months: [jul2010] [sep2010]

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