Beginners - September 2011

object oriented programming?
 
i want to get into object oriented programming using c++, and a thought crossed my mind.... would it be eaasier to learn if i learned an object oriented prgr...
[6 replies] Last: il keep that in mind, thank you for your advise :D (by even821)
Array Questions and infile question
 
for a project I am working on I need to use infiles. Is there a way to put 5 infiles into an array...and have them selected randomly once the infile is se...
[5 replies] Last: for those trying to help me, without the .txt files this is what i hav... (by stevew9948)
Please help me with this while statement and looping
 
#include "stdafx.h" #include <iostream> using namespace std; int main() { int x,y,z,a,b,i; y = 2; z = 4; a = 6; b = 8; i = 0;...
[1 reply] : This possibly (?): if( response == 'Y' ) { cout << " Great! What... (by closed account zb0S216C)
reloading data from text file
 
Hi all I am reading data from a text file line by line using ifstream and I want to reload the content of the text file after changing some data in the origina...
[1 reply] : Yes it's possible, but that would mean truncating all current data wit... (by closed account zb0S216C)
Segmentation Fault
 
#include <iostream> #include <cstdlib> using namespace std; void move_rings (int n, int src, int dest, int other); int testSign (int number); int newN...
[3 replies] Last: Dynamically allocating variables is a no-go since you're low on memory... (by closed account zb0S216C)
GCD and LCM of "n" numbers nor 2 numbers
 
i need program that can find GCD and another one for to find LCM of "n"numbers not 2 numbers thank you for trying answering
[1 reply] : First approach std::accumulate( v.begin(), v.end(), 0, gcd );... (by ne555)
Help with my looping function
 
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main() { int x; unsigned short int y; unsigned long int ...
[4 replies] Last: Hey thanks very much but can you help me with this one I cant quite gr... (by UrbonGamer)
Shift Left operator
 
I have a line in my code that I am trying to understand. It is: LPC_PINCON->PINSEL3 &= ~(3UL<<30); I understand the result but still do not completely un...
[3 replies] Last: ... but don't forget the final result is: 0011 1111 1111 1111 1111 11... (by Catfish)
<cctype>
 
I'm having a bit of trouble with some code. I'm writing a function that fills an array, but when I try to terminate the program using isdigit() it doesn't ...
[11 replies] Last: Thank you. Sorry if I sounded a bit worked up earlier, a few things h... (by Ben Duncan)
help guys..
 
hi guys im new in this forum and im searching for a code to learn about using "ifstream and ofstream" thats when i came upon this forum.. im a newbie when it...
[1 reply] : This is not a hard program, as you said, but you have to know some thi... (by CosminNTG)
can you compile without a compiler
 
i mean could you write a .cpp in notepad and compile it in cmd?
[3 replies] Last: First you get yourself a compiler. If you don't have one, try http://s... (by hamsterman)
Examples practice code to learn
 
Does anybody know a good website that offer lots of sample codes with incremental difficulties to practice and study. Examples that will cover all sorts of to...
[1 reply] : http://www.cplusplus.com/forum/articles/12974/ That's where a lot of ... (by Ben Duncan)
notice this
 
Is there any mistake? I want this program to shift numbers cyclically one right position. #include <iostream> using namespace std; int main() { ...
[no replies]
New Here - Need a Bit of Help
 
Hi all, I'm working a lab for my first exam in my first programming class. The concept is this: The Silly Savings and Loan Company just opened up with a ...
[no replies]
Trouble with using strings in classes
 
Never mind... I found my mistake. I forgot to put romanType:: in front of the method name. I'm getting an error that says my variable "romanNum" is undefined...
[2 replies] Last: Thanks Moooce. (by horseatingweeds)
Change Key, Virtual Keyboard
 
How i change? 9 to ( 0 to ) [ to { ] to ] I am making a utilitarian to help to program. I used as an example this: http://www.cplusplus.com/forum/beginne...
[no replies]
by BHill
Header file
 
I am using Borland C++ 6 Enterprise and have just typed a project from my book. I now need to create a header file and my book does not say how to do it(even t...
[19 replies] Last: I figured it was because I didnt shower yesterday :( . -BHill (by BHill)
A little doubt about delete
 
Can delete be used like this: delete a,b,c; Where a,b & c are dynamically allocated variables? This doesn't give an compiler error, or even a warning. ...
[11 replies] Last: There is a use, namely avoiding having to start a block after an if/wh... (by Athar)
Invalid initalization
 
Hey what's up, I'm back with more problems. This morning I was trying to make a program that outputs all the ASCII characters to a textfile, then outputs that s...
[2 replies] Last: Haha thank you . I just noticed the cout.put thing, i have no idea. I'... (by georgewashere)
Question relating to delete.
 
What is the point in delete beany.str? I thought deletion was only to be used with "new" dynamic memory? #include <iostream> using namespace std; #inclu...
[2 replies] Last: It was actually a student's code and I often look to him for advice. I... (by georgewashere)
September 2011 Pages: 123... 48
  Archived months: [aug2011] [oct2011]

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