Beginners - October 2012 (Page 54)

by yar
using from file
 
hello A question: when I use this code: ........fstream testfile; ........testfile.open("New Text Document.txt"); I have no problem. But when I use it: .....
[5 replies] Last: Maybe you need to specify the file is to be opened in write mode? s... (by Moooce)
Help with Adding this all up
 
So I just took out the parts of the code that were relevant below, the entire code is too long. Above the main are the functions being used. Here is my proble...
[5 replies] Last: You may want to return the value of selection at the end of mySlotSim... (by monad)
Help with homework
 
Write a program to process weekly employee time cards for all employees of an organization. Each employee will have three data items: the employee's name, the...
[2 replies] Last: When user enters hours worked =40, the program shows error. so please ... (by vichu8888)
Loop problem? or can't .txt file?
 
So I am having a loop issue each time I type in a valid file name after telling my program I want to run it again. It says cannot open file and I do not know wh...
[1 reply] : Yeah bring these lines at the end of the loop for it to work: filena... (by Aceix)
Word Counter Help Please!!!!
 
This is an assignment for class and my code works, but my teacher was being cleaver and put several spaces in between words so we couldn't count the spaces then...
[3 replies] Last: If you shall not use operator >> which was suggested by coder777 then ... (by vlad from moscow)
Segmentation Fault
 
My program compiles fine, but when it runs it will give me a segmentation fault. I have tried to get it to collect the strings for the message1 vector, but I ...
[6 replies] Last: It finally worked thanks though I took out the while loop. (by egonzalezjr555)
Volume Computation Gone Wrong! (1,2)
 
#include <stdio.h> #include <iostream> #include <string> #include <iomanip> using namespace std; class Box { private: int Width; ...
[23 replies] Last: The printData() you declared as a member of CPoint2D on line 11 takes ... (by helios)
Sum of the squares
 
Hey I am trying to write a program that will take the sum of the squares and I can't figure out what is wrong with my code. Mathematically, it makes sense but t...
[3 replies] Last: I see I never gave sum an initial value. Thanks it works now. I just g... (by OLittleO)
FML I don't know shit about logic
 
So this assignment's due in about an hour and 15 minutes... And I'm just out of my mind with frustration. So out of desperation I'm pleading for help Here's th...
[3 replies] Last: Bro I love you. No words... (by Momojams)
ball bounce using graphics.h
 
i need to create a ball bounce program where the ball would be of a user defined radius, it would bounce inside a rectangle of user defined length and breadth a...
[no replies]
Reference pointer
 
#include <iostream> using namespace std; int& modpnt(int*& p) { p++; return p; } int main() { int a=67; int *pnt; pnt=&a; cout<<"Here point...
[1 reply] : First - please edit your post with code tags - the <> button on the r... (by TheIdeasMan)
If else case and choose problem
 
Hello! Today i got a question that 1. To check whether no. is even or odd 2. To check whether no. is positive or negative depend upon users choice Actually i ...
[5 replies] Last: Oh..!!! It's working thanks a lot....!! really thanks ... :) (by shokeensanchit)
Input problem
 
I am trying to create a program that prompts the user to input a fraction such as 5/3 and then simplify the fraction so 5/3 would be 1 2/3. The issue is that th...
[3 replies] Last: Hey man I'm in your class; working on the project right now. Are you o... (by Momojams)
How to read a user-given file
 
I want to ask the user for the name of a text file and then have the file read into a vector which I will then sort. My question is: How do I read the file thro...
[7 replies] Last: Ok, thanks. I understand the concept but not so much the details lol (by WesleySnipes)
Weird Question
 
I need help figuring out exactly what this problem is trying to get me to do: Design an algorithm that uses one or many loops to iteratively parse a string o...
[2 replies] Last: Mostly semantics but name is the n + 1 character such that name is t... (by ryancb06)
Using binary search on a vector of strings
 
I am trying to create a spell checker program. I load and sort a 480,000 word document into a vector. Now, I ask the user what word to spell check. I want to us...
[no replies]
by nahla
Format and program.
 
You use the setprecision, setw and fixed manipulators defined in the <iomanip> header to control the formatting of numbers. Write a program that calculates the ...
[no replies]
by khal
functions
 
Hi, I was wondering what the .zeroth() is used for in C++. It is used in my textbook but does not explain what it does.
[2 replies] Last: template<class test> void table<test>::insert(const test & x) { ... (by khal)
Functions
 
I have beginning c++ course at school. I just started learning about functions. I have a homework assignment and I'm conceptually confused about what to do. I ...
[13 replies] Last: that someone pointed out about the implicit return of an int. 0 wi... (by cire)
••FORM STRING TO NORMAL STRING••
 
I have looked all over the internet and tried every thing I could; I can not figure out how to convert System::String to the normal std::string . Here is ...
[9 replies] Last: Okay. Thank you. I think I can handle it from here. For anyone wh... (by Forseth11)
October 2012 Pages: 1... 5253545556... 84
  Archived months: [sep2012] [nov2012]

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