Beginners - June 2012 (Page 24)

How do i make this program work 1/100
 
It says that the for-statement doesnt do anything i try to find a k that 1/(k)+1/(k+1)+...+1/(k+1000) is smaller than 1/1000. but i cant seem to get the damn ...
[12 replies] Last: Ok, thanks for the help! (by Doppler)
overloading operator *, and using private variables
 
hello this is my first time posting onto this site, and i am having a problem trying to use the private variables in the class.I believe i dont know the proper ...
[1 reply] : The problem isn't with accessing private variables, it's because you'r... (by Disch)
There is a error that I can not see...
 
/* I am sorry there are some parts of the algorithm that are in Portuguese, whereas I am from Mozambique. When I compile, it appears the following: C:\Dev-Cpp\...
[2 replies] Last: I have done it...but there is still the problem. What can I use inst... (by Nelson Alexandrino)
While loop confusion
 
Hi, I can't get this incredibly simple loop to work. What's wrong with it? HELP! The While loop should stop when the user presses anything other than 'n'. B...
[3 replies] Last: Moschops is right. '=' is a assignment operator whereas '==' is a rela... (by shubh01)
by btkr
Display whizzing by
 
Hello all, This is for a homework assignment - just can't understand why display won't pause. Searching online, saw info on std::cin.get(); Using it, but ...
[1 reply] : To further clarify, I have std::cin.get(); in 3 places. The first... (by btkr)
by dkl65
A question about union
 
Hello! I have recently read a section of a book about struct and union. They say that you can access the 4 bytes of a long int variable through a union. So, ...
[5 replies] Last: If you need to deal with arbitrary arrays of bits, you might want to c... (by AbstractionAnon)
by thipp
Switched compilers; need pause script
 
I very recently learned how to program at all, and I'm starting in c++. I started with a helloworld type program, and it worked fine. I made a program tha...
[8 replies] Last: Okay, that fixed it. Thanks for the help. (by thipp)
How to input a file name using a string?
 
Howdy guys, Hopefully my first forum post isn't too ambiguous, but I've searched for some time now across the web, and can't find anything. Basically I want ...
[3 replies] Last: Thanks CJC0117, worked like a charm. (by MasterTelion)
std::out_of_range
 
Hello all, Sorry to bother you all with a seriously newbie error but I can't for the life of me work out what I'm doing wrong here. Just learning to code and...
[5 replies] Last: Wow... so it turns out Eclipse was compiling the new project but, for ... (by ChePlusPlus)
by Ent2
error C2106: '=': Linker Operand have to be L value
 
Hi ive got a little Task to implement a Hash list without any Containers except string here now i cant find the problem could u may help me at this error? Here...
[4 replies] Last: [quote=Ent2] "error C2106: '=': Linker Operand have to be L value" A... (by closed account zb0S216C)
by don92
2d array
 
hey everyone, am facing a problem solving this when i enter 2 inputs it show 4 please help me how to solve it!! This is the question: A class of ā€˜nā€™ s...
[1 reply] : Where is your code? (by Volatile Pulse)
Filestreaming Help
 
Hey guys. My project is a reservation system. My problem is in filestreaming ( i think) . My objective that I can't figure out is to show that the cottage is re...
[9 replies] Last: Ok, I'm going to explain this once. Please put any code you post into ... (by Volatile Pulse)
Using vectors as member of classes
 
Dear all, first of all as I'm new in the forum Hello to everybody, I'm Luca. Hope I'll be able to help others as well as I get confidence with C++ I'm an e...
[4 replies] Last: I'd like to know if I there are alternative implementations that use ... (by Cubbi)
errors in composition
 
hello, i'm currently learning composition in c++. I created two classes which are tele and person, tele is a short name for telephone :P tele class can st...
[3 replies] Last: thanks Athar and Moschops Moschops you are right! that was my error. ... (by empror9)
How to insert a line of strings into a file at exact position
 
Hi everyone! For example: I have a file "data.txt" like this: FIRST LINE 123 456 789 LAST LINE Now I want to insert a string "NEW LINE" as a new line after ...
[1 reply] : I would recommend opening the file and searching for the line using a ... (by Need4Sleep)
What is C++ for?
 
Hi, I'm new here, and I'm wondering what can I use C++ for? My dad told me its for programming and stuffs, And I'm wondering how do you use it? I'm only 11. ...
[2 replies] Last: As volatile stated, jobs can range from statistical programs and simul... (by Need4Sleep)
Add Score
 
Guys, I need help. Whenever I enter "hint" and incorrect answer, my score is deducted, my problem is how to add score/money whenever I answer the word correctly...
[3 replies] Last: NwN, thanks for the effort, I appreciate it! It's been solved. Thanks ... (by markgreen)
get a string from a data file
 
#include <stdio.h> main() { FILE *f; char str ; f = fopen("data.txt", "w"); fprintf(f, "%s", "This is a line"); fclose(f); f = f...
[5 replies] Last: @Moschops: Thanks! #include <stdio.h> #include <string.h> main() { ... (by nhim175)
Compiler Not Working URGENT
 
Hey im a complete noob but im learning c++ and i like to mess around with Visual Studio 2010 Express C++. than one day I launch the program and it saids my tria...
[1 reply] : I have no idea what to tell you other than trying a different IDE or t... (by Volatile Pulse)
How to iterate through enums
 
I've been trying to figure out how to use the advantages of enum s over static const unsigned variables by creating objects with them like so: enum eSuit { ...
[9 replies] Last: I'd probably wrap it in a class or something if you wanted to do that. (by firedraco)
June 2012 Pages: 1... 2223242526... 51
  Archived months: [may2012] [jul2012]

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