Beginners - July 2011 (Page 22)

How can I...
 
I wrote a clock program but it writes 0 0 0 for example but i want it writes 00 00 00 How can i do that
[5 replies] Last: thank u webJose i write it like this with your help cout<<setfill('0'... (by closed account 9wX36Up4)
by benp84
Protected Inheritance
 
Why can't this derived class access protected data from its base class? class A { protected: int n; }; class B: public A { int f(B* b) { retur...
[3 replies] Last: b->n looks like trying to access a private member. So even if the ob... (by Catfish)
error with quick sort
 
Hello Everyone, I have created a Quick Sort Algorithm, but I get error Segmentation Fault, whenever I run in Linux Terminal. After displaying the array, I g...
[6 replies] Last: While we're at it: #include <iostream> #include <vector> #include <a... (by Athar)
tutorial error
 
#include <iostream> #include <string> int main() { using namespace std; char response ; cout << "What is your name? "; cin.getline(response,256); if (s...
[7 replies] Last: I have a few books I abandoned C++ for Dummies, it was not explained ... (by metulburr)
Constructor only running when passed value
 
Hello Cplusplus.com! I am working on a simple zoo simulation program to work on my knowledge of classes, and even though I am only a few lines in, I already hav...
[4 replies] Last: Thank you! I was just being stupid I guess. (by lfnunley)
Independent copy of a pointers information
 
Hi everyone, I have a typedef boost::shared_ptr<example> exampleptr; I want to pass this pointer to a function: void AddToList(exampleptr a); I...
[3 replies] Last: IIRC you want two instances of the same class, some information will b... (by ne555)
Learning new software
 
So I have about a month before school starts again and I'd really like to learn some GUI programming before that. I've looked into Qt, MFC for visual C++ and C...
[2 replies] Last: For Qt I just went through the tutorial on how to make a battery m... (by jeffsg605)
Problems with Memory Manager Class
 
I have been set a test piece of code that should write the answer to the test to screen and I am struggling to understand the role of the memory manager class w...
[6 replies] Last: Where exactly in LoadItemFromFile does it break ? (by hamsterman)
Saving Data
 
Hi, I am a novice and was wondering how I could save data, like a string or integer, to the hard drive to be accessed somehow later on, instead of everything be...
[6 replies] Last: Oh wait, it is working for me; I was looking in the wrong folder. Sorr... (by Laelaps)
glitchy programs...help please?
 
im first of all i am using Code::Block after i build and run a program that runs successfully the window pops up. no matter what program I run (whether I ...
[9 replies] Last: that worked thanks (by metulburr)
by wtf
ShowWindow(hwnd, 0) ShowWindow(hwnd,1) not working.
 
Once I do a call to ShowWindow(hwnd, 0) or ShowWindow(hwnd, 1) repeated calls to ShowWindow have no effect.
[7 replies] Last: Ok well what is the vm message code for vk_control and f11 and f2? Cou... (by wtf)
else not working
 
#include <iostream> #include <string> int main() { using namespace std; string today; cout << "What day of the week is it? "; cin >> today; if (today =...
[4 replies] Last: ah ok thanks (by metulburr)
destructor class function
 
I need to build destructor class function for this but i dont know how. #include <iostream> #include <string> using namespace std; class node { public: ...
[14 replies] Last: not a homework. self study. school doesent teach this. (by vastrolorde)
Difference between endl and '\n'
 
What is the difference between using endl and '\n' to start a new line in the program? And which is better for use in programs(and why)?
[3 replies] Last: Well, they behaved the same for me as well. But I understood what you ... (by Nisheeth)
Making guis... what do you guys reccomend?
 
once I finish reading my c++ book, I'd like to move on to making guis. what is a way to make guis? I've heard qt4.0 is good
[3 replies] Last: QT is Probably the best CrossPlatform solution. Personally I love Int... (by ultifinitus)
for loop not working
 
why isnt the for loop running???i want to enter 1000 numbers in 10 different files....following is my code #include<iostream> #include<conio.h> #include<cti...
[2 replies] Last: One problem you have is that you are leaving out 100, 200, 300, 400, 5... (by kooth)
Initializing 2d array with variables
 
How do I declare this array? char array ; The user needs to be able to specify the number of rows and columns. I'm not having much luck searching around...
[8 replies] Last: Ha! I love this forum. Thanks shacktar. (by jeffsg605)
Returning an Array from a function
 
Hi there, Bit of a quick background - I'm a developer experienced in C# and am currently trying to learn C++ (using Win32 API). As part of an exercise I'm...
[3 replies] Last: Excellent! Thanks so much for your help. I looked into dynamic memory... (by scermat)
error's definicion
 
Hey! I have a problem. I learn C++ since 2 days, and i use Visual 2010. I want to use function 'error' but i can't ' cause : "error C3861: 'error': identifier ...
[1 reply] : Do You want the error to be printed out in visual studio´s error box ... (by Incubbus)
'cout' Does Not Appear In Console
 
Hi, This is my first post! I have been working my way through the tutorials here at www.cplusplus.com, and I have been using what I learn in each stage to cr...
[11 replies] Last: @obiwang for( int j = 0 ; j < 5000000 ; j++) ; // for delay This ... (by dams)
July 2011 Pages: 1... 2021222324... 54
  Archived months: [jun2011] [aug2011]

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