Beginners - July 2011 (Page 33)

Possible Function problem?
 
I'm working on a function within a larger program that asks the user to input the name of a file. If the file exists, the program is supposed to print out the t...
[3 replies] Last: getline reads a line. A line is something that ends with \n. istream:... (by hamsterman)
What is the differece here?
 
Hi all, What is the difference between Class A { int a,b,c,d; Class B; }; and Class A { Class B { int p,q,r,s; }; }; Whi...
[3 replies] Last: If that's true then they're both nested classes, yea. I wasn't aware o... (by toexii)
Help! It's Killing Me
 
İ don't Know english well so i will try to tell with my best. I wrote these codes but it's sure it's not working well. And it's killing me that can't find wha...
[8 replies] Last: First of all don't use quote for code. Use code. At line 17 you have... (by closed account 9wX36Up4)
by Erik
a simple LL(1) parser code
 
I'm not too familiar with forums, so I'm not sure if I posted this in the right topic. I apologize in advance if I'm on the wrong topic, or if I'm not allowed q...
[2 replies] Last: It isn't really reasonable to expect anyone to explain a piece of code... (by toexii)
HI
 
hi folks, i am new here,i know some basics in c++. i would like know answer for this question..? #include<iostream.h> #include<conio.h> void main() { int a=...
[5 replies] Last: His code is fine for the compiler he is using. (by closed account z05DSL3A)
Why does this code work?
 
Hi, I was reading a book and I came across this code : #include <iostream> int main() { using namespace std; cout << "Enter characters; en...
[2 replies] Last: cin reads from a special file called Standard Input . Even if you g... (by Catfish)
Returning a pointer - in a mess!
 
I am trying to create a fruit machine game and it was going very well until today. I am trying to get the program to pick a symbol (called class Symbol) fro...
[6 replies] Last: Thanks for everyones help but I went back to the drawing board and sol... (by chesterbloke)
Help needed with errors and Adding Brute Force
 
Hi I am coding a packet scanner. I keep getting these errors that I have no idea how to fix... I searched them on google looked around to find other posts and i...
[1 reply] : bump (by chicken2134)
by tonnot
How to know when and end of contiguous << operators has arrived
 
I have a function with the operator << overloaded my_class & my_class::operator << (int value) { i++; return *this; } So I can write : my_class()<<1<<33<...
[5 replies] Last: BTW it does not have to be a template function, I skimmed the last lin... (by closed account z05DSL3A)
by Cymos
Recommended projects?
 
Hey. I am still really new to C++, but I fully understand how "realistic" I need to be with my goals and targets - and especially how optimistic I should be ...
[3 replies] Last: I started learning about input file reading/output file writing after ... (by jeffsg605)
Macro is declared but not defined?
 
Hello all, This should be my last question, as far as I know macros work you type in something like: #define MacroName(x) x*x*x*x or something like tha...
[1 reply] : This can be a file sentinel. A file sentinel prevents multiple inclus... (by kooth)
Do While loop help
 
#include <stdio.h> #include<math.h> void main() { char ask; do{ double ai, aj, ak; printf("Please enter an ai value. "); scanf("%lf", &ai); get...
[5 replies] Last: you can not declare main as void. Declare it int main() and don't... (by jeffsg605)
what does it mean to have two names in class declaration?
 
Hello all, Completely new to all things C so... I am looking at an .h class and it has two names after the class keyword at the top: class PROG_SPEC P...
[1 reply] : (i) Look for hash defines in the header files which are included in th... (by ashishkumar)
the source code (implementation) of STL algorithms
 
Where can I find the source code/implementations for those STL algorithms, like the one, http://cplusplus.com/reference/algorithm/search/
[1 reply] : You can find it in your compiler's C++ include path. When you #include... (by Duthomhas)
Help in a class for Complex Numbers
 
I was making a class for Complex Numbers. I want to know one thing though. Say I create a class Complex_t . It has a string Num. It will store the Complex...
[3 replies] Last: /* NOTE: Not part of your class, that's why you need the frien... (by kooth)
... parameter
 
Hiho all! I was wondering how does the ... work in the printf function. Is it just an unlimited amount of parameters of any type? Can i implement it in my own f...
[3 replies] Last: Thanks for help! I got the idea. (by Breadman)
by Rox
Question about structs
 
I am reading about classes and structs and different ways to use them. In one example, I have seen this kind of declaration: struct test { int val; ...
[1 reply] : I might be wrong here but it looks like this code is casting a to a ... (by closed account zb0S216C)
Converting string of text file into char []
 
Hi. I try to convert string of text file into char . And below is the code. // reading a text file #include <iostream> #include <fstream> #include <string> us...
[1 reply] : One thing is that brackets on line 27 are empty, which is wrong becaus... (by hamsterman)
by tonnot
Is there any way to call some function on a class without the constructor was called ?
 
I'd like to call some function on a class without create it (I dont want to use the code placed at the constructor ) Any idea ?
[3 replies] Last: Thanks. (by tonnot)
C++ CS106B Standford University
 
Hi All, I am doing CS106B Standford university course and practising C++ exercises from the book/reader.I am stuck on the exercise bcoz i don't understan...
[3 replies] Last: Aren't you just trying to compute the Riemann sum with 100 divisions a... (by mcrist)
July 2011 Pages: 1... 3132333435... 54
  Archived months: [jun2011] [aug2011]

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