Beginners - September 2013 (Page 52)

How would I create an input and ouput file, at runtime if they do not exist?
 
Below is the code I am playing with (I realize its not working currently) but wanted to know if th...
[1 reply] : if you try to open a file with ofstream and it doesnt exist it will cr... (by closed account Dy7SLyTq)
Structured Data: Nesting Triangles(using structs and doing some geometric calculations)
 
nestedTriangles.cpp (attached) description: The program takes as input a pair of triangles, ...
[no replies]
by Aibsr
operator[]
 
What should the operator return in a function that returns the -n-th element in a list? //This i...
[2 replies] Last: Thanks (by Aibsr)
file text problem!!! Solution needed!!!
 
once i enter the second name... but the file only contain one name which is the last one i have ente...
[4 replies] Last: Info on arrays: http://www.cplusplus.com/doc/tutorial/arrays/ If I w... (by BardaTheHobo)
Program to count characters, words and lines
 
I have a program that is written here that is not providing accurate counts on lines and words. I h...
[no replies]
Global variable being ambiguous?
 
Hello, thanks for viewing my question. I am teaching myself C++ from a book; the program below is...
[5 replies] Last: Arrh thank you, I understand it now; I thought that was what it was us... (by SoftMOUNT)
Fstream and structs conflict?
 
I'm trying to read in strings and integers into separate arrays using structs but it's not working r...
[2 replies] Last: (++count is better than count++) ++FOO increments FOO and returns F... (by Daleth)
All Same Array
 
Hi, This function only return to true in every case. I want to return to true if all the array eleme...
[3 replies] Last: You could, for each element in the array, iterate over the array again... (by Daleth)
References and de-references
 
http://www.cplusplus.com/doc/tutorial/classes2/ What does it mean to have a -> de-reference sign ...
[1 reply] : Check out the section on data structures, it explains the arrow operat... (by Danny Toledo)
i need help..check my program and help me plz
 
write a c++ function void sum(double& sym,int n) which calculates the sum 1/1+1/2+1/3+...1/n where n...
[7 replies] Last: please tell me how to print this on screen? All you have to do is ad... (by Danny Toledo)
Member Initializer List
 
How exactly does Member Initilizer List work?
[2 replies] Last: thank you so much, you've been very helpful (by Filip Cvetko)
errror help expected ';' before ')' token
 
Hi, quite a newbie here and having problems with a function. Getting an error that says expected ';...
[2 replies] Last: wow! stared at that for an hour, and was lost. Thanks so much!! (by Pepper12704)
by Nalin
Reading STL file (stereolithography)
 
I've been searching for instruction to read STL files. STL files are generated by CAD software and...
[no replies]
Have i set this up right so far?
 
Complete
[1 reply] : Yeah, it looks conformant to the initial problem description. (by TheGrayWolf)
Why are my variables not initializing
 
Hey, worlds worst programmer here with another(hopefully) simple question. I'm trying to create a p...
[2 replies] Last: num1,num2,num3,num4,num5 = atoi(buf.c_str()); This seems stra... (by abhishekm71)
by elfeck
Setting pointer in function
 
Hello, I want to do the following: class A { private: B* myPointer; public: voi...
[3 replies] Last: That doesn't appear to accomplish anything. At line 8, b is local... (by AbstractionAnon)
Can't read from file for no reason
 
HI! I have two functions they are exactly the same : int ShowStudentsInfo () // This function r...
[3 replies] Last: Thank YOU @nevermore28 and @AbstractionAnon Yes I'm sure there is no n... (by Ardeshir81)
Suggestions on a saving/loading system with enumerated info
 
Currently I'm saving all the enumerated info by writing the enums to file and loading is working fin...
[no replies]
how to separately add two statements into a file text?
 
void cakeType () { int id; cout << "Cake ID Flavor" << endl; cout << "0101: Chocolate...
[4 replies] Last: You do write explicit std::endl after price in your code. You do clos... (by keskiverto)
Replacing one character with two
 
Hello guys, I an new to c++ and tried to do a program wherein the user enters his name and each let...
[5 replies] Last: well thanks (by madara uchiha)
September 2013 Pages: 1... 5051525354... 64
  Archived months: [aug2013] [oct2013]

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