Beginners - January 2013 (Page 50)

by Hotice
Directory tree
 
I am trying to make a directory tree with windows.h. The program gets stuck in an infinite loop and I haven't the slightest idea why. Here is the full code: ...
[2 replies] Last: EDIT: I found out that you could just use (fdstack.top()).dwFileAttri... (by Hotice)
Annoying Brother!!! (1,2)
 
My brother installed this game he plays on my laptop and sometimes he plays for sooooooooooooooooooooo long! Im really sick of sometimes waiting an hour just to...
[29 replies] Last: Thanks! (by closed account LN7oGNh0)
evaluating each word in a sentence
 
I'm working on a text game to get myself back into the basics of c++ and hopefully learn new things along the way. I want to be able to process two-part command...
[2 replies] Last: Thank you. Looks like I have a lot of reading to do. (by AndroidZ)
by WaaaaW
Feasible strategy for interpreting instructions?
 
Hi, I'm interested in knowing if this approach of solving a problem is an appropriate one. I would like to specify a thing's behavior intuitively in terms of st...
[3 replies] Last: Hmm, I see. It's good to know that I'm at least on the right track wit... (by WaaaaW)
ifstream has no match for operator << with char
 
Hello, I'm writing a program that is meant to simulate a Turing machine, and I'm currently stuck at simulating the tape. I actually think I've got it all done, ...
[5 replies] Last: << is the output operator, ifstream is an input-only stream. You can'... (by VelikiDrMr)
Arrow Keys
 
When I Took C Coaching 4 years back my Teacher told me about using arrow keys using backslash characters. I dont remember now it was something like \r for right...
[2 replies] Last: If you're referring to escape characters, then no. For example, \r is ... (by ResidentBiscuit)
Constructor overloading with templates
 
Hi! I'm trying to overload my constructor and running into errors. My code is working fine with just one constructor but I try to overload it gives me errors: T...
[10 replies] Last: To clarify what I mean CXMLString<const char*> foo(false, "tag"); ma... (by ne555)
if this or this then that
 
Hi, I just started doing some stuff with C++ a few hours ago and I have a little question. I know you can have if this then that, but can you also have twice th...
[1 reply] : Yup, C++ has a lot of different operators including logical operators.... (by Krzysztof Kawa)
USACO "bead" problem
 
This is "USACO" bead problem, why doesn't it print the number? #include<iostream> #include<fstream> using namespace std; int main() { int n,i,out=0...
[3 replies] Last: Thank you but I understood my answer . If you want to know the correc... (by rapunzel)
binary to decimal
 
Hi friends, I am trying to find the decimal form of a binary number and I have done till here and am not able to detect where I am going wrong . #include<iost...
[1 reply] : The code does not compile #include<iostream.h> #include<conio.h> voi... (by Chervil)
All Domain Computer's Informaiton
 
Hello Hi all! Ok getting straight to the point, Below is the code I was able to formulate to get information about the PC I'm using, I want to modify this code ...
[2 replies] Last: Installing your program on every machine would work, but what if you c... (by SamuelAdams)
Printing an array
 
Hello all, I have a function that returns a pointer to an array, but its elements are not being printed as I expected. Function fills up an array from user ...
[3 replies] Last: Yes I missed that part, now it works. I suppose I can just initialize ... (by pointer13)
prime numbers
 
can we find primes numbers between 0 and 10^7 using sieve of eratosthenes or should i use any other method??
[1 reply] : I may be wrong, but I've always considered the sieve method to be fast... (by Chervil)
Looking for friendly advice
 
Hi, I have just written my first Tic Tac Toe game. I was just looking for some input on how to make it a little more compact/easy to read. Also looking possibly...
[8 replies] Last: And the other half.... } else{//if player1 is set t... (by derrikjb93)
what is this? cin.unsetf(ios::skipws);
 
cin.unsetf(ios::skipws); what is this and how is it used? we had this exercise and the teacher used it to extract characters...but he didnt much explain..why...
[1 reply] : it's the longer way to write cin >> noskipws it stops formatted input ... (by Cubbi)
Template overloading
 
Hi! Well the header file of my code I'm working on is: #ifndef CXMLString_H #define CXMLString_H #include <iostream> #include <sstream> #include "CCo...
[6 replies] Last: i'm using eclipse. Also, could you help me with one problem? In the he... (by noisycoder)
Help with functions
 
Hello --- relatively new C++ programmer here (have experience with Visual Basic but not extensively). I am trying to get the following code to compile using Bo...
[6 replies] Last: Firedraco --- thanks for the explanation --- it makes total sense now ... (by Mickelplick)
Comparing Two Strings
 
I am a beginner and would like to ask a question My Code: ///////////////////////// #include<iostream.h> #include<conio.h> void main() { clrscr(); cou...
[1 reply] : Hi there, You are trying to compare c-strings, which are basically ar... (by closed account o3hC5Di1)
methods of cin
 
What are the different ways to get user input? I have seen getline(cin, var_name) which gets input and sets it as a string. cin >> var_name which goes up t...
[1 reply] : cin.get() -> http://www.cplusplus.com/reference/istream/istream/get/... (by Fransje)
Duplicate Numbers, Output not right?
 
I'm trying to make a program to input the various amounts of applications put in at a store over 12 months, and to show any duplicate amount of applications bet...
[3 replies] Last: Some problems: Lines 6 & 8: x starts at 0 and increases, z starts at ... (by TheIdeasMan)
January 2013 Pages: 1... 4849505152
  Archived months: [dec2012] [feb2013]

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