Beginners - November 2010 (Page 19)

One part of a code won't print out on window
 
because of this return 0; cin.get(); it must be cin.get(); return 0;
[4 replies] Last: The question is: Why am I beginner in c while I'm not? (by coder777)
recursive functions of a class
 
I am trying to write a recursive sorting member function of a template class, but once it executes the the function call it crashes. Please Help!! template ...
[1 reply] : Why does your insertion sort need to be recursive? (by jsmith)
by Brayan
binary to dec...
 
Im writing a programmm witch should covert bin to dec...so far i've got this: #include "stdafx.h" #include "stdafx.h" #include <iostream> #include <strin...
[5 replies] Last: ok i understan now. but what about changing 1 to "i" ? And my progr... (by Brayan)
by Phasor
Linked Lists
 
I've just finished reading up on linked lists and pointers and tried to make a simple linked list on my own, except it's not working. I tried debugging myself a...
[3 replies] Last: no. it should just be while( current != 0)... but then you have to ... (by hamsterman)
Problem with writing byte
 
Hi all I am trying to write an array in a file in bytes. I can write file if the values are lower than 255. I am using fwrite: fwrite(&myArray ,1,1,fi...
[5 replies] Last: Thanks for all replies. With your help, I solved the problem. C... (by kenter13)
Custom Exception Class frustration.
 
Sorry, but exceptions have me lost. I understand the basic try, throw, catch, but in trying to understand it better I have become frustrated and you guys alway...
[3 replies] Last: Don't make an enumeration for exceptions (because you could only catch... (by moorecm)
if statment within a do while
 
im new to c++ , im making a simple attacking system i need help with the do while to work with the if statments. #include <cstdlib> #include <iostream> ...
[1 reply] : Does this compile for you? I thinkyou need an } after line 86, yo... (by Pax)
Simple question about vectors of pointers
 
Question: Is it dangerous, or at least bad practice, to have multiple vectors of pointers to the same objects? For example: #include <vector> class MyCla...
[5 replies] Last: Thanks for your help. I'm not familiar with smart pointers or boost so... (by Confusedent)
Finding the size of a stream (LPSTREAM)
 
Hello all! I hope you can help with, what I hope, is a simple question! I have the following code: OpenStreamOnFile (MAPIAllocateBuffer, MAPIFreeBuffe...
[2 replies] Last: Thank you that worked perfect! (by dbridle)
Add operation in Bitset
 
I am new to C++ programing. Hence, I request you to provide solution for the following problem. How to create two bitsets, say A and B such that each bitset ...
[3 replies] Last: and: A &= B or: A |= B ... this http://www.sgi.com/tech/stl/bitse... (by coder777)
Problem with calculator program includes stacks
 
Hey im having problems with my program and i am not sure whats wrong.i will underline what i think is not working I do know that error messages pop up telling m...
[1 reply] : Looks like you are trying to pass a string object to the function ato... (by Tabian)
How to output a cout to another dos window?
 
Hi everyone... I am not sure if this has been asked before... but my problem is... int main(int argc, char *argv ) { int count; for (count = 1; coun...
[no replies]
How to compare numbers inside a txt file
 
Hello everyone... I have been using C++ for a while now and I still have trouble solving some of the questions.... =.= Before I start, let me say thank you f...
[8 replies] Last: Thanks!! Finally got it to work!! XD (by gunlocksp)
by Brayan
First programm
 
Hello, I'm new at C++ programming....i have never programmed befor so im having a hard time. I'm writing binary calculator...i want to read string of "1" and "...
[1 reply] : Your for loop conditions are wrong. I think you want to change i=0 to ... (by Pax)
Do while loop not executing properly
 
My do-while does not execute properly and I'm not sure why. I believe it has something to do with my if...else if statement because the loop executes properly i...
[3 replies] Last: You read into 'option' on lines 8 and 10. You probably want to change ... (by Pax)
Execute program from Command Prompt
 
I have written the following program. Can anyone please tell me how to execute this program? C:\Users\myname\Documents\Visual Studio 2005\Projects\PPA\debug\pp...
[1 reply] : cd "C:\Users\myname\Documents\Visual Studio 2005\Projects\" ppa.exe ... (by Athar)
question about class member inheritance
 
Say I have something like this: class Base { public: Base() { numObj++; } ~Base() { numObj--; } static int numObj; }; int...
[1 reply] : I don't see why it wouldn't be a bad idea right off hand, other than a... (by closed account S6k9GNh0)
Multiple File compilation
 
I hope that this is an OK place to ask this. I'm having trouble with compiling multiple files. This is one of the errors I'm getting: swpcards.cpp:4: err...
[3 replies] Last: Actually, I got it. Thanks to both of you! (by jamesmk)
by jjp
Volume of a sphere using call-to-value function
 
Hi, I am trying to write a program that uses a call-to-value function to evaluate the volume of a sphere. My program below will run but gives the wrong answer...
[8 replies] Last: I'll give you a better link. This site actually has a great tutorial ... (by HooklessFastener)
Array of pointers to objects
 
I have removed a lot of extra code in program to simplify the problem. I have a Student Class that hold a Students Name & 5 grades. The Array class is suppose...
[4 replies] Last: I did basically what you said and after going back and re-reading the ... (by mcelgiraffe)
November 2010 Pages: 1... 1718192021... 42
  Archived months: [oct2010] [dec2010]

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