Beginners - February 2013 (Page 16)

file open, and close
 
can i open a file in both read and write mode at the same time like this: ofstream outputfile; outputfile.open("Dbase.txt"); ifstream infile; i...
[4 replies] Last: @InfinityCounter: Just for curiosity, what grade are you? (by RobertEagle)
Function to find Prime Numbers
 
Hey guys, I was hoping someone could let me know if this is a good function to determine if the number in 'n' is a prime number. Here's why I have so far: b...
[2 replies] Last: you can reduce the time complexity of your algorithm. There are ways t... (by abhishekm71)
cout print order?
 
I have a function that I am passing two arguments, one of them by value and one by reference. int problem_001(int,int& t); Before calling "problem_001", "...
[2 replies] Last: @OP - You may find http://stackoverflow.com/questions/10778627/why-is... (by cire)
Please check this Array code for me Please!
 
Somehow the complier keep giving errors saying undeclared identifier. Please help. code: /*****************************************************************...
[2 replies] Last: i is the numbers... I dont know if that's exactly how you would write ... (by mlk5436)
Can I compare static methods?
 
This was discussed here: http://stackoverflow.com/questions/1765431/c-comparing-member-function-pointers But I still don't really get it. The answerer said: ...
[6 replies] Last: @JLBorges Data members. Not functions. Oh, I am sorry. I am not... (by vlad from moscow)
by s1l3nt
Header file problem
 
So I am creating a header file to be used in my .cpp source files. The header file is done correctly (appears to be) and if I include it and use it in just one ...
[12 replies] Last: Gotcha! I understand now! Thank you!! (by s1l3nt)
Confused by Compiler error...
 
Hello! Alright so this code is nearing completion, but I can't seem to get rid of this annoying compiler error and it is making absolutely no sense to me... ...
[3 replies] Last: Ah yeah Disch, you're right it was indeed a typo. I always tend to ove... (by Merriak)
by CAP
Nested if else statement errors
 
I've never posted in a forum before. I wish I could highlight my "else" errors I'm getting. Does anyone see anything wrong with this code pertaining to if/els...
[4 replies] Last: @diyzoe Please start your own topic, don't hijack this one. Starting... (by TheIdeasMan)
Display the price of the inputed item and display the total price of the inputed quantity of the item
 
I need to make a program in cplusplus.. Here's the instruction: make a program that when the user input an Item name it will display or print the price of the ...
[2 replies] Last: So what i must do to make it run correctly.. Like if i inputed the ite... (by xxpneumatic)
by Gunnir
Identifying methods within a method
 
{NOTE sorry if this question is poorly worded, I'm a very basic C++ user.} I want to create a method that either selects one of the arguments in another method ...
[9 replies] Last: If you use the toupper (or tolower) function, you can avoid testing th... (by TheIdeasMan)
critique my code please
 
im currently trying to get the hang of passing/returning structures to and from fuctions and also passing structure addresses. am doing it right, guys? ...
[1 reply] : It's Ok. I would get rid of the getPerson method and change X = g... (by binarybob350)
by Reece
Problem with for loop...
 
#include<iostream>//program that uses C++ standarded library string class #include<iomanip>// parameterized stream manipulators using namespace std; int ma...
[2 replies] Last: The following won't compile, your trying to create a static array with... (by binarybob350)
by Nonlin
C++ Enum Issue
 
Solved.
[no replies]
by yoo
Heat conduction through a window HELP
 
Im trying to find the heat conduction for 3 different substances and i just recently downloaded microsoft visual 2012. I tried making cases for each part and af...
[2 replies] Last: Just from a cursory glace you start with the problem double x = new ... (by K0T4K0t4)
How to: literal string arrays...
 
Hi everyone, I'm creating a program for which I want to create some basic, templated "starting" sequences. These are only run once and don't need to be fast,...
[3 replies] Last: Thanks guys, that really cleared things up :) (by ausairman)
How do I create a new .txt file in a file directory I want, and allow a user to edit it?
 
OK, I have tried google, and the forums here, but none of it answered my question. I need to create a new .txt file, in a certain path on my computer, and then ...
[no replies]
Helppp please!!! Ending program in key press not working
 
Hi, i am writing a program that requires me to take isbn numbers from the user and display there name and price. This is done using arrays and gotoxy. Then you ...
[2 replies] Last: Closed account?..... (by greenleaf800073)
Create a program algorithm in pseudocode
 
Deliverable Length: 3 charts, an algorithm, and a 2–3 paragraph description Details: This week, one of your smaller customers needs your help writing a pro...
[1 reply] : This is not a homework service. (by Zhuge)
structures and loops
 
i have a structure and i am going to enter data and store the data in a txt file. However i also want to be able to loop the program so that if i decide to make...
[1 reply] : you need to append data at the end of the file, make a search in the... (by Marcos Modenesi)
Help me make sense of these errors dealing with Classes ?
 
carLot.cpp: In function `int main()': carLot.cpp:155: no match for `std::ifstream& >> AUTO&' operator /usr/local/include/c++/3.2.2/bits/istream.tcc:83: ca...
[5 replies] Last: string is a header file which defines the string class and some supp... (by Disch)
February 2013 Pages: 1... 1415161718... 67
  Archived months: [jan2013] [mar2013]

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