Beginners - September 2012 (Page 2)

Removing Comments
 
hi, this code below lets me insert a .cpp file and removes any comments start with /* and end with */ so i edited it so that it removes comments start with // ....
[12 replies] Last: Another gotcha: lines that end with a backslash continue on the next ... (by Disch)
Using cin with while
 
Can anyone please explain the following code ? char buffer ; //declares a char array of length 10 while(cin >> buffer){ //? cout << buffer ; //prints t...
[3 replies] Last: Initially ,I thought some kind of comparison is taking place. But her... (by Raman009)
values of base-class pointers when assigned the address of derived-class objects
 
Hello everyone, I have the following piece of code: #include <iostream> class A { public: A() : m_i(0) { } protected: int m_i; }; c...
[3 replies] Last: I don't know for sure, but if you consider class as struct: class A's... (by tntxtnt)
by Serri
Problem with large values
 
So i'm trying to divide large numbers into prime factors. My problem is that if the value is greater than 1*10^9 the program does nothing and just exit. Anyone ...
[1 reply] : A 32-bit signed integer can hold values from -2147483648 to +214748364... (by Chervil)
Windows Form Application...
 
Hi, just wondering if they are a way I can create a Window without using Windows Visual c++? Basicly just wont a window to display text and pictures? I've h...
[1 reply] : Well, visual C++ is Microsofts c++ compiler. If you want to create a ... (by pogrady)
by Pebble
The Right Package.
 
I want to learn C++ and was thinking of getting C++ for Dummies by Stephen R. Davis, And while this is ok to start with, I'd like to learn C++ to an advanced ...
[8 replies] Last: Videos are how I got started, without them I wouldn't be programming n... (by Zephilinox)
code help
 
hi. can someone help me match, or mirror, these two pieces of code. the linked list should do the same thing as the array, and in the same order. The array vers...
[1 reply] : why no replies!!!!!!!!!! (by codetojoy)
implementation of lists through linked list .whenever i delete a node and call display function loop runs infinitely
 
#include<stdio.h> #include<malloc.h> struct node{ int data; struct node *next; }; void incert(int num,node *pointer) { while(pointer->next!=NULL)...
[1 reply] : Read this: http://www.cplusplus.com/forum/beginner/1/ (by Owain)
help prime number function
 
i am supposed to complete this assignment: write a program that asks the user for a non-negative positive number greater than 1. The user is re-prompted to e...
[3 replies] Last: In this case fib() function are wrong. If I input 9 in fib() function ... (by Shinigami)
If I read the whole c++ tutorial on this website, will it be enough for me to maintain a multiplayer game with 2 of my friends?
 
hello, I was just wandering if it would be possible to maintain a multiplayer game .exe if me and my 2 friends learnt only the c++ tutorial on this web. I k...
[4 replies] Last: you would at the very least need to know how to use a graphics library... (by Zephilinox)
Finding the largest number using if
 
I am new to C++. I was trying to do a program that find the largest among 5 doubles but I always get the same output here is my code: /* programmer...
[2 replies] Last: First: use arrays or vectors from STD to store numbers. Second: don't ... (by Shinigami)
by yesh11
Using for-loop
 
this is a simple selection sort C program ok(sorry for letting me put up a C progam in a C++ forum, I hope its just the syntax change and this is a very basic p...
[1 reply] : This is how a for loop works for(A;B;C)D; 1. A is executed 2. The con... (by eklavya sharma 2)
How to name variables and functions?
 
Hi everyone! I'm new here (and a C++ beginner), and by that I would like to ask a simple first question; when naming variables and functions, is it better ...
[5 replies] Last: Beware! Identifiers that contain 2 consecutive underscores are reserve... (by closed account zb0S216C)
by ElizN
Adding Items to Vector
 
Hi! We are doing a team project. My part is to write the function for changing a string of items to separated items and place them in the vector. Also, to write...
[1 reply] : That's a lot of code to read without tags, but from your description, ... (by Stewbond)
fiLe handLing
 
i want tO add the salaries from a fiLe tO the prOgramme aLL the cOde is compiLing but the problem is that output file is not showing total of the salaries.. ...
[5 replies] Last: help me here in this cOde pLzzzzzzzzzzzz (by biLmLik)
Need help with this (functions, mainly). I'm stuck!
 
I've gone as far as I can go because I just absolutely hit a dead end. I don't know what to set the return to in the double GetMarkupPrice(double dMSRP, int ...
[2 replies] Last: I got everything to work perfectly, except for one thing: #include <... (by degausser)
show all printed data on console
 
How can we see all printed data on console ? by scrolling some of printed data we can see but not all. I wanna see all printed data . . Could any one guide h...
[6 replies] Last: "path\program.exe" >out.txt (I suspect your path has spaces in it, o... (by Mathhead200)
First Program Using Classes
 
Hey everyone, I'm a bit confused as to how to use classes and arrays together, and then calling functions to use on them, as this is my first experience with...
[3 replies] Last: Im just working on the assignment really early, its not due for at lea... (by ilovelearning)
ROT13 program problems
 
I am trying to make a simple program in c++ that reads text from a txt file, decodes it using ROT13, then prints the decoded message to another txt file. I a...
[1 reply] : Correct usage of eof(): if(!(inputstuff >> foo)) { if (inputstuf... (by soranz)
Need Help Implementing Ignore() Into Program
 
Hello all, I'm still a relatively new C++ coder and I'm having trouble implementing an ignore() function into my program. I have a program that reads in 10 l...
[2 replies] Last: Ah!!! Thank you very much! That was EXACTLY the hint I needed! I didn'... (by SlipperehPuppeh)
September 2012 Pages: 1234... 62
  Archived months: [aug2012] [oct2012]

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