Beginners - October 2011 (Page 9)

by gh24
Getting Separate Vectors from txt File (1,2)
 
Hi Guys, I am struggling a lot at this point and could really use some help. I have the following code that works with getting data from a text file and sto...
[26 replies] Last: Aha! Just as I thought. :) Take a look at line 60. T is being reused ... (by JMJAtlanta)
Expression: deque iterator not dereferencable
 
solved
[no replies]
DICE while
 
I am doing a program which switches betwen two players, first players throws two dices and their added, then second player throws. So far so good, however: ...
[no replies]
HELP:: READ FROM FILE and PRINT!
 
I am trying to make a program that prompts the user for a file name and displays the contents of the file on the screen. The contents of the file must also be p...
[1 reply] : First break the problem down into steps. 1) Prompt the user for a fil... (by JMJAtlanta)
How to store random number in int?
 
I'm trying to make a program that says something random every time you press enter. I can't figure out how to store a random number into a variable. How woudl I...
[4 replies] Last: rand is a simple function with a simlpe return value as any other func... (by Litaken)
while loop conditions
 
I have been trying to do this for a few hours and i cant seem to stop the loop at the end of the file please help me. int main () { char x; int count=0;...
[2 replies] Last: I don't get why you're comparing count to characters since count is an... (by bool maybe)
Advanced Learning?
 
I'm just starting with learning how to code in C++ using the tutorials from the PDF here and also the tutorials on http://www.cprogramming.com/ Once I have c...
[2 replies] Last: Take this here: http://www.advancedmsinc.com/programming/advanced.htm (by Stefan Friptu)
Making Up down Arrow for comments
 
Hey !! Guys I wanna put(not make) an up down arrow in my comments but when I copy and paste it from character map it comes out too small ...Up down Arrow ...
[4 replies] Last: dun wrry abt it anymore i made it already with /\ (by qwertyasdfgh)
Return int to double?
 
Im getting a warning from DEVC++. It is saying "Warning-converting to "int" from "double"" All i want my function to do it return a double instead of an int...
[2 replies] Last: Thank You!! (by Cosimo Vilardo)
how does sizeof() work?
 
This function correctly prints out size of an array in a function. Can someone please explain to me how it works? Many thanks. #include <iostream> using name...
[8 replies] Last: Not surprising. This kind of array and template trickery is intermedi... (by Disch)
by JBabyJ
Can someone please show me how this was solved?
 
Okay, here is the question, and the answers are below, but I have no idea how the answer was arrived at: Show the exact output, given int Numbers = ...
[2 replies] Last: First off there appear to be a few extra comma's, I don't know if that... (by Computergeek01)
little help to understand this code
 
I found this code on internet which I was unable to understand Please help I am a beginner but I really want to understand this struct node { node(int i, ...
[15 replies] Last: OK Finally I got it. Thank you thanks a lot really. I never thought I ... (by jasleen90)
by xdega
Basic timer function.
 
Hi. I am writing a very basic function to be used as a timer. I want it to simply print the number, then clear the screen. I do not want to use the System(...
[1 reply] : I should probably clarify that "n" is the parameter used for the amoun... (by xdega)
Incorrect Output
 
Hello, I have a function that's asks the user to "hit or stand" by entering "h" or "s" and any incorrect input will ask the question again. Then in my main f...
[3 replies] Last: @silver1x After calling a function, control is sent back to the nex... (by whitenite1)
expected primary expression before else?
 
Im having a problem at the moment. I just finished my program(its still in a very rough draft, I am working out all the kinks) and im having a problem. I kee...
[2 replies] Last: It makes perfect sense. I just redid it and it works perfectly. thanks... (by Cosimo Vilardo)
by fkrafi
Compile C++ using cmd
 
I can compile following code using "cl A.cpp" but i want to compile with an input file A.in and generate output file A.out.. is there any why to do that from cm...
[no replies]
C++ Help on Program Please
 
Ok I started writing a program for my class and am stuck. Here is the assignment and the code along with it, I did write a good amount and understand what I wro...
[no replies]
Cant find the problem
 
This is a program I've written for school with the help of another student. If you run it you'll immediately see what the problem is, however I cannot. Any he...
[1 reply] : #include<iostream> #include<iomanip> #include<string> #include<fstrea... (by wolfgang)
passing an array through a selection sort and couting it
 
I am very new to programming(2nd project) and cant figure out how to cout my selection sort so that my array passes through it and then prints out in a sorted a...
[3 replies] Last: for(int i=0; i<array_size; i++){ //initialization } selectionsort(a... (by ne555)
by vict
How to disclose class interface but hide implementation
 
I want to write a C++ class, like this: In MyClass.h: class CMyClass { public: CMyClass(); int MyFun(int a, int b); protected: i...
[5 replies] Last: That's the first time I've seen a forward declaration like that. I was... (by shacktar)
October 2011 Pages: 1... 7891011... 59
  Archived months: [sep2011] [nov2011]

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