Beginners - December 2014 (Page 35)

by Dinot
Question about predicates and error in code
 
So this is my first post and i hope i am not doing anything wrong..Recently i picked up the book Accelerated C++:Practical Programming by Example . I am now on...
[3 replies] Last: AFAIK, in Windows, Ctrl-Z at the start of a line always signifies eof. (by JLBorges)
problem with c++ while loop
 
this is my code i did with c++. and the program should only accept numbers. it need four correct input to proceed to next process. and should ignore wrong input...
[1 reply] : In each while loop you have the input twice, e.g.: cout << " Enter you... (by coder777)
Splitting a double linked list in half and appending the first half.
 
I don't even have code to show, I just cannot figure out how to split a double linked list in half and stitch it back together at the end. I've done a bit of se...
[5 replies] Last: I noted one of my point was misleading but i just re-edited that plus ... (by closed account SECMoG1T)
Invalid Null pointer?
 
I'm trying to show the number the first user inputted in ascending and descending order. The first part works great, the descending part gives me Invalid Null P...
[1 reply] : Nvm fixed it stupid me why did I put = 0. (by Code Apperentice)
by Vito
Confused with x++,++x and /
 
I get two codes. double x=43; double y=43; double z; x = x++/4; y=++y/4; cout << x << " " << y <<" "<< endl; The output is 10.75 11. At line 4, does the cod...
[2 replies] Last: I'm surprised it even works. As MiiNiPaa mentioned, what you're attemp... (by Immo)
Need help with 10x10 array assignment
 
Hello everyone i need help in making 10x10 array in which it all containts 0 then i would have to put 1 in random elements in it then when finished, the program...
[3 replies] Last: You might want to read the tutorial on arrays: http://www.cplusplus.co... (by dhayden)
Cannot convert argument 'int' to 'char &'
 
I am getting a compiler error and I don't know how to fix it. I know that I need to declare something as a template just not sure where I am going wrong. Thank...
[7 replies] Last: template <typename T> T& myVector<T>::operator (std::size_t index ... (by dhayden)
I dont know how to cout for error
 
I have an assignment which is to do a program that accepts only grades, in which I used float. but I dont how to add cout for invalid input. please help me. i r...
[10 replies] Last: You have a few errors in your program with braces. You definitely need... (by Immo)
Confused
 
Greetings, I am new to C++ and am using Bloodshed. I have an assignment due tomorrow. We were kind of thrown into this and I cannot see what the issue with m...
[18 replies] Last: It is not antiquated at all. The namespace eases the monotony of std::... (by Immo)
by Charli
ofstream: insert data in a file without overwriting
 
What i'm trying to do : I'm running a loop to print a list of words in a .txt file with ofstream. Once i exit this loop i go back to the beginning of the fil...
[3 replies] Last: Files will probably be slower, but they have advantage of not having t... (by MiiNiPaa)
by xsxsux
Got a little file problem..
 
I read about how to input/output data from a file to a program. Then I decided to experiment it with easy codes n stuff. But my program won't work...I don't kno...
[1 reply] : You probably saved the file in the wrong location. The program looks f... (by Peter87)
Need help on pointer/address
 
If aPtr is an integer pointer, then &(*aPtr) has the same value as aPtr. (True/False) Can somebody explain what this means? Thanks.
[5 replies] Last: this would evaluate to the dereferenced value at the address of the po... (by aarnold404)
Last Few Memory Game Questions
 
Thanks to this forum I'm getting there folks! So now it's showing the elements from my array string, but it should be showing "PE" (for Periodic Element) in...
[2 replies] Last: Here are the complete instructions I've received and I've barely crack... (by lollipoppop)
Need help adding value to first 0 element in array
 
Hey so I have a black jack program and I am trying to set up a function to take the next card in the deck and add it to the users hand. This function is suppose...
[5 replies] Last: Having the value -858993460 (or similiar values) happens sometimes whe... (by JayhawkZombie)
Need help with a calendar project
 
In this project a user needs to enter a numeric month and a year. The output is a single calendar month with the name of the month followed by a grid of the d...
[no replies]
by Danny7
function biggest numbers help
 
Write a function that finds the larger of two integers input (in the main program) but allows you to change the value of the integers in the function using pass...
[6 replies] Last: If so, then just pass them by reference if you want the change to be p... (by JayhawkZombie)
reading data from a file works until trying to read floats
 
I'm reading data from a file into an array of floats to eventually use in the prices::assign function. However, the array never gets populated and that makes i...
[1 reply] : Set a breakpoint at line 82 in your compiler so when you debug it the ... (by aarnold404)
by Danny7
function larger interger
 
Create a function called larger which takes two integers as its parameters and returns the larger of the two integers. I think its set up right so far but I...
[2 replies] Last: thank you! (by Danny7)
terminate called after throwing an instance of 'std::length_error'
 
After fixing a few other things that stopped my code from compiling I ended up getting the message "terminate called after throwing an instance of 'std::len...
[no replies]
Help with Vector Averages
 
Hi there. I need some help with a program i am making for a class. It is a statistics program for vectors/arrays. One of the functions i need to make is one tha...
[4 replies] Last: yeah, right after replying, i fiddled around with it a bit. vector<... (by Xavier3MG)
December 2014 Pages: 1... 3334353637... 55
  Archived months: [nov2014] [jan2015]

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