Beginners - June 2011 (Page 27)

A quick question on strings and destructors.
 
If I have a class such as class MyClass{ [..] string myString; [..] }; do I need to delete myString in my destructor? I tried to experiment with this b...
[3 replies] Last: No you shouldn't. string Mystring is not a pointer So you can't use d... (by XanderMax)
What's some of the reasons you would need to use threads?
 
What are some of the reasons you would need to use threads?
[5 replies] Last: regarding Framework's comment on deadlocks, they usually happen when t... (by kfmfe04)
ofstream
 
#include<iostream> #include<string> #include<conio.h> #include<list> #include<algorithm> #include<fstream> using namespace std; Hi!!! I have a problem with st...
[2 replies] Last: I'am sorry for the first code. That was not orrect. But now it seems t... (by XanderMax)
If problem
 
#include <iostream> using namespace std; main() { int a; int n; cin >> a; if (a%2==0) cout << "Broj "<<a<<" je paran"; for (n=0; n>=a; n++) { ...
[2 replies] Last: Thank you very much it's working, but still some problems. When I remo... (by Neutral)
by nz3msb
Help on program
 
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream infile; ofstream outfile; string firstname, l...
[2 replies] Last: i wrote infile >> lastname >> firstname >> currentsalary >> payincreas... (by nz3msb)
clrscr
 
I'm unable to use clrscr function.... i'm using DEV C++. i've included stdio.h and even conio.h guide me please..........
[1 reply] : Could you provide an example please? Is there any particular errors yo... (by Philip Lee Bridson)
Why is queue front something weird?
 
I cant figure out why my program is saying that the front of my queue is something that it shouldn't be. Without posting the whole long code, what could possib...
[11 replies] Last: Isn't that what the rear member is for? ;) (by LB)
Whats wrong with this code?
 
I was trying to recreate a program from a book. My IDE is VS express 2010: // CharacterEncoding - allow the user to enter a // numeric value the pri...
[5 replies] Last: Alright It's fixed thanks guys! It was 3 am in the morning when I was ... (by Paradoxx)
-*-
 
sorry
[2 replies] Last: [quote=ascii]What the hell...? I think he/she want's to recreate each... (by closed account zb0S216C)
Review: Math Tutor
 
Hello, I am having a little problem with this program, I'm supposed to make a program to send out two random then pause the program to make the person solve and...
[4 replies] Last: @ecstasyaeternus, in the future please don't just post answers to peop... (by ascii)
function inside IF statement ignored
 
Hi all, yesterday I spent the whole day on a problem I simply won't be able to figure out. I got an IF statement inside a while loop and the IF statement con...
[6 replies] Last: how in the world could I overlook that ?! Thx Wazzak (by dudewhatsup)
SIGSEGV Segmentation fault. Yet another one.
 
I have a really weird seg fault. This is the code: Map::Map(TileSet &t, string fileName) { int amountOfLayers; ifstream file; file.open(fileNa...
[6 replies] Last: I would have thought this was the offending line: tile->sprite.SetPos... (by anonymous23323124)
A few questions
 
Hey everyone, first post but I'm an avid crawler of the forums here =P I have a few questions to see if any C++ gurus out there can help me with 1) Is it ...
[3 replies] Last: Here are some examples, not tested of course... 1) From the descripti... (by moorecm)
by Nixit
need some help
 
Hello friends, I had seen some coding like thins on the internet and i have confusion regarding to that code look like this... class myclass { public: ...
[3 replies] Last: @Framework, I thought the OP merely meant them to be placeholders for ... (by anonymous23323124)
by Prudok
Interface
 
Hello everybody ! I have got one question. Is it possible to make C++ programms with own Interface and graphical elements ? If it's possible, then how to do it ...
[3 replies] Last: Oh, that's amazing ! I thought it is impossible. Thank you guys. (I am... (by Prudok)
by Prudok
Text
 
Hello. Is it possible to make some text red , but not all.
[2 replies] Last: Thanks, i did it. (by Prudok)
Error help Photo added! URGENT! HELP
 
i used to use python, but i recently switched to c++ i wrote a program and it keeps giving me this error. Cannot find the file specified. can anyone please he...
[9 replies] Last: I don't use Visual Studio. I use MinGW it works fine or try LINUX (by ionutica)
Can I create a structure with non-constant array lengths_
 
Can I create a structure with an array, in which different instances of the structure have differing lengths for the array? Pseudo-code example: struct mystru...
[5 replies] Last: No, it won't. Mainly because you'll get a compile error (you can't del... (by LB)
by waka
is it possible to use a for-loop to make multiple Char arrays
 
Hello, I am trying to declare a user determined amount of unique Char Arrays. I would like to know if this is possible, and if so what is the best way to go ...
[7 replies] Last: Check this out: #include <iostream> #include <vector> #include <stri... (by m4ster r0shi)
How to use stringstream more than once?
 
I can successfully use a stringstream once like so: std::stringstream lconvert; lconvert << lvalstr; lconvert >> lppos->mSector.x; lconvert >> lppos->mSe...
[2 replies] Last: I see first I was trying to do it with lconvert.flush(). If I call lc... (by Gladdok)
June 2011 Pages: 1... 2526272829... 41
  Archived months: [may2011] [jul2011]

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