Beginners - January 2012 (Page 9)

by vin
Reusing an ifstream variable doesn't work
 
To get some practice with fstreams I adapted Maggi Maggi's code from this thread (http://www.cplusplus.com/forum/general/59984/) to read the testdata input file...
[2 replies] Last: That fixed it. Thanks. (by vin)
Binary to Decimal code c++ help
 
Hey there,I'm looking for assistance with my simple code here. Why do my integers ( x,v,z,d,e,f,g,h ) suddenly become weird numbers when the program reaches...
[4 replies] Last: In lines 8-15 you are using the variables but you haven't set them yet... (by Stewbond)
Can two variables of same type be declared/defined in one line?
 
I am a Fortran user for most of my life. In Fortran we do this: int x, y When using C++, can I declare two variable of same type in just one line like...
[5 replies] Last: Thank you, firedraco!!!!!!!!!!!!!!!!!!!!!!!! (by subjugater)
compiling error for ctor in a derived class
 
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <vector> using namespace std; enum CS{ Polar = 0, Ca...
[2 replies] Last: LB, Following your instruction, my script works! Thank you very much!... (by subjugater)
problems with seek and fscanf
 
when i do seekp/seekg the period is underlined with red saying no instance of overloaded function. When I do fscanf it says the * matches no operands. im ...
[1 reply] : Do you want us to read your mind? We can not help unless you post the ... (by LB)
Losing Float Object Data in array
 
Hello. I have some experience with Java, but I'm finding that programming in an object-oriented sense in C++ is a world different, and I'm a bit lost among all...
[5 replies] Last: I solved the problem. Turns out the problem was originating from forg... (by NewEonOrchestra)
Looking for some help
 
Hello, Im new to C++ programming and am looking for a mentor of sorts to help guide me through learning c++. my plan is to buy literature on it but i need some...
[8 replies] Last: I would like to say http://www.youtube.com/user/antiRTFM makes great t... (by TheMassiveChipmunk)
Seekg(),fstream
 
------------------------------------------------------ Name: Qasim Zafar Address: Khanewal, Block 14 Date: 26-01-2012 Destination: Lahore ...
[3 replies] Last: you can't jump to a certain line unless all the lines have the same am... (by jmbauer1)
how do i read(show output) from a file?
 
how do i show output on command prompt from a file? The type i want to show is a string.
[5 replies] Last: Read in from file. If that's a booking, display it. Repeat until reach... (by Moschops)
CMD Begone!
 
Is there a way that I could make my program run off something else? I don't want the CMD to be my main source of running programs. Plus it would be nice if I c...
[13 replies] Last: LOL thanks for the help though! (by hellninjas)
Help with my text game?
 
Here is my code please help me with the errors!? / The Adventure.cpp : Defines the entry point for the console application. #include <cstdlib> #include <ctime> ...
[1 reply] : I think the error is on this line srand(time(0)); . If you are callin... (by Peter87)
Help with my text game?
 
Hi can anyone help me with some errors I'm getting in my program? Here is the code... #include <iostream> #include <string> using namespace std; bool in...
[4 replies] Last: Duplicate: http://www.cplusplus.com/forum/beginner/60318/ Wazzak ... (by closed account zb0S216C)
Is my code efficient?
 
I have an assignment that requires me to create a program which asks for a single letter grade (A,B,C,D,F) and based on that input, print a GPA (4,3,2,1,0). I w...
[5 replies] Last: Here's a few small suggestions: -Avoid global variables as much as po... (by closed account zb0S216C)
Help?
 
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv ) { cout << "Hi! Do you want to take a...
[5 replies] Last: Keep your alans on, Gates, I'll change it :)P Wazzak ... (by closed account zb0S216C)
by Nalyk
Finding the remainder using bitwise operators.
 
I recently picked up a book and am currently in the process of teaching myself how to code in C++. At the end of one each chapter are are exercises that you ca...
[8 replies] Last: If I mask out the x bits, I won't have an answer, because those shoul... (by Disch)
Several simple questions about an interesting test
 
The problem comes the first (it's a bit of lengthy but definitely easy): This is a test of your C++ design and programming skills. 1) Make an inherita...
[3 replies] Last: tfityo, Thank you so so much for your input. The structure you sugges... (by subjugater)
by malice
How do you make the basics fun?
 
I've tried self teaching myself C++ via C++ Primer Plus and Object Oriented Programming in C++ and always find that it's so dry I have a hard time keeping focus...
[9 replies] Last: You can use tutorials which teach you fundamentals of c++. Tutorials s... (by Nexius)
Opening Files in a For Loop
 
I am trying to use the following code as a guide: const char* fileName = testName.c_str(); indata.open(fileName); My question is, how can I use thi...
[1 reply] : If you're going to get the const char* from the string class, you may ... (by Nexius)
How would I get one character from this string?
 
I have a string ("ABC") and I want to retrieve the first letter from it. I then want to turn that single letter into a char. How would I do this? This is what I...
[6 replies] Last: use the [(unsigned int)] operator to retrieve the element from the str... (by Nexius)
Real-time programming collaboration
 
Do any of you know of any good and of course, free, real-time programming collaboration applications/web based tools?
[1 reply] : For anyone interested, I found this one: http://collabedit.com (by Lynx876)
January 2012 Pages: 1... 7891011... 48
  Archived months: [dec2011] [feb2012]

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