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: ...
Jan 2, 2013 at 9:16pm
[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...
Jan 2, 2013 at 8:37pm
[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...
Jan 2, 2013 at 8:03pm
[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...
Jan 2, 2013 at 6:45pm
[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, ...
Jan 2, 2013 at 6:06pm
[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...
Jan 2, 2013 at 5:50pm
[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...
Jan 2, 2013 at 5:48pm
[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...
Jan 2, 2013 at 5:04pm
[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...
Jan 2, 2013 at 3:57pm
[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...
Jan 2, 2013 at 3:49pm
[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 ...
Jan 2, 2013 at 3:10pm
[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 ...
Jan 2, 2013 at 2:29pm
[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??
Jan 2, 2013 at 12:52pm
[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...
Jan 2, 2013 at 12:51pm
[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...
Jan 2, 2013 at 12:36pm
[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...
Jan 2, 2013 at 11:49am
[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...
Jan 2, 2013 at 11:36am
[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...
Jan 2, 2013 at 10:03am
[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...
Jan 2, 2013 at 9:43am
[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...
Jan 2, 2013 at 8:00am
[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.
Registered users can post in this forum.