Beginners - December 2010 (Page 3)

Best way to use std and where to put it
 
I need help on how using std. Is it good to put it as a (using namespace std); or just put is as a std::(something);? If so do I need to put (using namespace s...
[3 replies] Last: Thanks Disch. This was something that was confusing me by looking at s... (by borkus)
whats happening here?
 
hey people, recently i was found out something interesting but couldn't find any explanation to it!, so please help. can u explain whats happening here? ...
[2 replies] Last: cin and cout both have implicit casts to void*: http://www.cplusplu... (by Disch)
Best way to use std and where to put it
 
I need help on how using std. Is it good to put it as a (using namespace std); or just put is as a std::(something);? If so do I need to put (using namespace s...
[2 replies] Last: Thanks. (by Gamtester)
Calculator Script
 
Hello, everyone. I've been working on a script that works as a calculator to evaluate input and return the appropriate value. I don't have a compiler to work ...
[3 replies] Last: Yeah, I got a chance to compile it and it had like 30 once I closed a ... (by Ameobea)
error: passing as 'this' discards qualifiers
 
I been having this "error: passing as 'this' discards qualifiers" which i didnt understand it clearly. Any idea where i mistaken? I have surfing the net to look...
[2 replies] Last: My Student class class Student { private: string name; stri... (by miaOnDeLine)
getline(cin, var) not working
 
I have a long program here... #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; int main(int argc, c...
[4 replies] Last: Thank you very much. And I got an answer for option 2 in my other thr... (by Zia Ur Rehman)
Input to a character, without pressing return key
 
Here is a piece of code... char o; cout << "Is this possible? y/N\t"; cin >> o; The output would be the question displayed and cursor waiting for ...
[2 replies] Last: Oh. Thanks... That is exactly what I needed... (by Zia Ur Rehman)
fstream problem
 
Hello, i want to create a simple program which: 1.takes from a file some datas:(kbts/sec + time wanted to complete)for a download 2.finds the bandwidth 3.s...
[3 replies] Last: can someone show me the code pls. I mean smt that works. I need this p... (by Giannisl97)
void uses and application
 
My first understanding of voId is not of real use but in most classes it is in use and in main function it is used. My perception of the use is as destuctor for...
[6 replies] Last: [quote=Kyon]Void is also used as a parameter to represent the absence ... (by Disch)
The largest sum of elements
 
Hello! I created tables n x n and I filled it any real numbers #include<iostream> using namespace std; int main() { unsigned int n, max=0; ci...
[3 replies] Last: how is that wrong? the task was to find the column with greatest sum. ... (by hamsterman)
by Alen75
Hey everybody
 
Who can tell me a problem...in c++...
[1 reply] : #include <iostream> using namespace std; int main() { cout ... (by m4ster r0shi)
by nathvi
.Exe program in codeblocks?
 
Hey everybody, I was wondering how I would start making a simple .exe file for windows using the code blocks environment. Any help is appreciated.
[1 reply] : Create a new project, write your code and select Build/Build or press ... (by Athar)
C++: generate random symbols in string
 
Programm on C++ that generate random symbols (A-Z, a-z, and other symbols in ASCII table) in string (size of string 255) and count all the small letter in strin...
[1 reply] : http://www.cplusplus.com/articles/how_to_ask/ (by Bazzy)
Problem with a function inside a class
 
Hello. I encountered a curious problem while working with SFML. I created the following class to manage an object's images and sprites: class imagen { ...
[4 replies] Last: I'm just getting familiarized with C++, and since my goal is to develo... (by Davitosan)
Error creating multiple text files
 
Alright let's start with the code: #include <stdio.h> #include <tchar.h> #include <fstream> #include <iostream> #include <string> #include <math....
[4 replies] Last: good reason not to do it. But then how can i create a loop so the user... (by closed account 4Gb4jE8b)
Heap "was not declared in this scope" error
 
I'm relatively new to C++ and am having a problem with the heap and variable scope. My code looks like this: #include <iostream> using namespace std; ...
[4 replies] Last: Thanks, Bazzy and Davitosan. I'm just having a little trouble getting... (by danpolitte)
Error in constructor
 
#include <complex> complex<double> max (complex <double> * array,int numberofelements)throw(std::string){ if (numberofelements < 1 || numberofelements > ...
[2 replies] Last: ah thank you. Also you're missing a semicolon on line 5. also ... (by Toothkiller)
Problem with a BST (binary search tree) !!!
 
Hi, The Problem : I need to access elements of a BST (binary search tree) by their rank. However, the nodes of the tree do not contain the field rank. For e...
[8 replies] Last: thank you very much :) i cant believe i didn't see why that i shoul... (by pirlo89)
C++ standards are not working for me..
 
Hello , as you might have guessed ,I'm a perfect newbie.C++ is on my high school syllabus and the IDE we are using is Turbo C++ 3.0 on windows xp platform. T...
[10 replies] Last: Microsoft products will prevent you from learning things like linking... (by Disch)
by linoch
how to make a loop repeat at a certain point?
 
if (initial_pile == 1 || initial_pile == 2 || initial_pile == 3) { int computer_choose1 = 1 + rand() % ((initial_pile) - 1 + 1); cout << "The computer ch...
[6 replies] Last: how about using the "The goto statement" Never do that.... (by kbw)
December 2010 Pages: 12345... 35
  Archived months: [nov2010] [jan2011]

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