Beginners - May 2014 (Page 41)

printing to outfile?
 
I can't figure out why I can't print to the outfile. I'm getting errors in this area. On line 134 I've got std.print(out); if I remove 'out' then it compiles, b...
[2 replies] Last: I see. Got it now. Thank you (by akennicutt72)
by Light1
File input...
 
If you input in the file from the program below, then it should be something like this: n number1 number2 ... number(n-1) How to change the program so that t...
[4 replies] Last: It is in C99. However C++ prohibits its use. (by MiiNiPaa)
Priority Queue with Heap
 
I am trying to print items as I remove them from the priority queue, but no data is being printed. The data is going in properly but it is not printing as it is...
[1 reply] : Here is the airworthy.cpp /** * @file Airworthy.cpp */ #include... (by avanhoes)
too many initializers error
 
I'm getting s error: too many initializers for 'const wchar_t '. What's wrong? void usernamearray(){ const wchar_t names ={{"0x56","0x45","0x52"}};...
[4 replies] Last: Great thank you! (by dNocito)
writing a program that averages test scores
 
I am unsure about how to start this program. I need to write a program that reads a file consisting of students' test score in the range 0-200. please help I ne...
[2 replies] Last: maybe a struct holding a sum of scores falling into the range and ... (by rich1)
by Cronin
Basic input output help?
 
Hey guys so I looked through the basic input/output section of the tutorials and I came across a problem I need help with. My code below shows the basic input o...
[7 replies] Last: Thanks dude. So let's say I state that the user input has to be a numb... (by Cronin)
PLEASE HELP!
 
thanks
[4 replies] Last: You have return 0; inside your while loop. This will cause you to ex... (by AbstractionAnon)
What Am I Doing Wrong?
 
I am working on a project covering pages 459-466 of C++11 for Programmers by Paul and Harvey Deitel, using Microsoft Visual Studio Express 2013. It involves fil...
[4 replies] Last: I do not know the exact instructions, but that would look like you are... (by JockX)
Force destructor to print only 1 statement
 
Hello, I'm wondering how to force the destructor to only print 1 cout statement mine prints all names i made a pointer dynamic array of name and other vari...
[14 replies] Last: when i removed the string StuName it prints the teacher name not the s... (by Exculibar)
Help with infile reading program
 
Hello guys, fairly new to programming and to this website in general. I need some help with a couple of sample programs, and I'll try to be as explicit as possi...
[8 replies] Last: The problem is line 32-34. After you read the last line of the file a... (by AbstractionAnon)
Taylor Series
 
How would you find the Taylor series: sin(x) = x - (x^3/3!) + (x^5/5!) - (x^7/7!) + ... if you could not use the standard library routines such as exp() or pow(...
[3 replies] Last: In two variables, one fo the numerator, the other for the denominator.... (by kbw)
'double' to 'const std
 
cannot convert from 'double' to 'const std::basic_string its problem with the string material .. error at return material void Greenhouse::setDescription(s...
[1 reply] : For basic data types you can only return one from a function, unless y... (by mutexe)
questions regarding classes and member initialization
 
Hello, Trying to make sure I thoroughly understand the tutorial regarding classes and member initialization given on this site. Looking at this short program: ...
[3 replies] Last: Thanks much. I thought this was the case (in both of your replies reg... (by SkyCountry)
Help me with this exam
 
Create a program for interpretation of a simple instruction set consisting of the instructions: MVI, MOV, AND, OR, NOT, LESS, LEQ, GRE, GEQ, JMP, PRN, SUM, SUB,...
[no replies]
Help in stopping distance
 
Hi all I really need help down here I had wrote the whole problem correctly without errors but Part b) I couldn't solve it because I didn't get it can any body ...
[4 replies] Last: I was giving a conceptual answer. Do you see how you have if (stopp... (by PrivateRyan)
Can't get fstream to read file input
 
Hello, I'm going through a simple C++ book trying to get fstream to display in command line from records.txt now I have made the file and put it in the correct ...
[12 replies] Last: Agreed, C++ Primer 5th edition is known for being good. And is reccome... (by GreatUnknown)
Return to main?
 
Hey guys.. I'm having a little issue figuring out how to get my program to restart if a wrong parameter is entered. Can anyone point me in the right directi...
[2 replies] Last: Arh! It can be so easy when you see it. But figuring it out before see... (by TheConfused)
LNK2019
 
I feel like I'm missing something simple. I keep getting this error and I cannot figure out what I'm doing wrong. Error 1 error LNK2019: unresolved external ...
[2 replies] Last: Thank you so much. As usual I was over complicating things. Now hopefu... (by akennicutt72)
by mekki
how to search string and ignore cases?
 
hi, i do have a string (file.txt) and use str.find for search. however, i would prefer to have a case independent search and the translation into capitals or l...
[3 replies] Last: that will keep me busy, thx a lot, cheers m (by mekki)
by chofs
majic square problem using 2d arrays
 
hey i wrote a code that checks if the input matrix in the text file is a majic square....the code is working bt when i input a a matrix which is 5 by 5 or highe...
[no replies]
May 2014 Pages: 1... 3940414243... 55
  Archived months: [apr2014] [jun2014]

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