Beginners - March 2014 (Page 8)

input from file
 
hi, how would i go about inputting a file and then checking if a number entered by the user in the console is present in that file?
[2 replies] Last: the file contains many numbers set out like 1 3 5 6 7 9 1 4 6 is there... (by LEHCAR95)
unique_ptr syntax
 
Hi, I'm having problems with the syntax of unique_ptr. If in my header file I have declare a unique_ptr: unique_ptr<float > ptr; How do I allo...
[3 replies] Last: thanks!, that was exactly what I was looking for (by santiagorf)
rounding to one decimal place
 
i'm trying to get the percentage difference to be rounded to 1 decimal place, however this code is not working and is making the output all wrong and mixed up. ...
[1 reply] : Did you #include <iomanip>? You need that for setprecision(). I just... (by wildblue)
FOR LOOP
 
Question 2a Include the for loop below in a small program named question2a.cpp and complete the program. The loop should be executed 10 times. Do not change th...
[1 reply] : Where are you stuck? Can you post what you have so far? (by wildblue)
by chofs
calling a function within another function
 
hey guys am trying to call my function to calculate deltaT to trapazoidal function so that i can use dt in trapazoidal function but its not working......plea...
[1 reply] : Line 91: Where is dt defined? CalculateDeltaT returns a value, bu... (by AbstractionAnon)
A question from a beginner about his code.
 
I'm a complete beginner when it comes to C++. (I started yesterday) Could someone please tell me why my code doesn't work, I've looked through it multiple ti...
[4 replies] Last: OOOHH, I'M SO STUPID, I KNEW THIS. ... god... Thank you guys for hel... (by xahenstraz)
VS keeping console up
 
Alright I'm having a problem keeping the console up when writing c++ in VS Express 2013. I know a way to keep it open when running a hello world application is ...
[3 replies] Last: Ill try both, that article and finding the setting to keep the console... (by football52)
calculating "e"
 
Hi. I was trying to solve a question from c++ how to program book but I ran into problem with it. It says find the "e" number from an equation. but ijust get e ...
[3 replies] Last: You're more than welcome mate. If you want to keep the console open, s... (by mutexe)
by Xephyr
SDL Tutorials?
 
Just wondering if anybody knows of any useful SDL tutorials. I don't find the tutorials on the SDL website very full. I've done general searching on Google bu...
[2 replies] Last: Thanks for that- I decided I will use Lazy Foo's tutorials, they seem ... (by Xephyr)
by nvrmnd
defining methods of template class outside it
 
Let's say i want to define a method of a Stack class outside it : I was thinking of : template <typename T, typename Container = std::vector<T>> class Stack ...
[1 reply] : I think you can at least remove the default template argument when def... (by Peter87)
by lays
problem with good() member function in ifstream
 
I wrote a list of code which try to read in digits from a text file. And I wanna stop the loop if up to the EOF of the file. It comes to me a problem that .good...
[5 replies] Last: > But why filein as condition right? if(filein) : true if the last ... (by JLBorges)
Hellp
 
please convet Algoritm to C++ code //---------------------------------------------------------------// int O(int k,int j) { if (j==0) return ...
[no replies]
by csharp
median number
 
I am trying to sort three entries to max, min and median I figured max and min but I have problem with median also I am not sure if my if statements are ...
[7 replies] Last: you are right I just realized that if (x > y && x > z) cout <<"M... (by csharp)
Anything helps
 
Need major helped I don't understand programming at any help would be amazing. Write (also compile and execute) a complete C++ program that generates a one-d...
[1 reply] : 1) Do not repost 2) We will not write code for you (by ccsdude)
by rs2991
Array Issue
 
Can someone please compile my code and see what the problem I am getting an undefined reference error and I am just stumped on what to do I have tried about eve...
[4 replies] Last: Thanks! I was able to solve it. I (by rs2991)
Exclusive or notation
 
I am in need of just some notation help because I missed this lecture... And unfortunately I can't find the answer in my book. We are making a truth table an...
[3 replies] Last: I unfortunately did not know what you meant by odd 1's to equal 1s e... (by giblit)
trouble with homework completely destroyed
 
So I have gotten a new homework assignment and I have been working on it non stop for 4 days now. I have read the book and watched videos but im having trouble ...
[7 replies] Last: [quote=owenkmc]is that using the namspace std; or is that how you type... (by TwilightSpectre)
by sky3
array of classes
 
I keep getting an undefined reference to `Vehicles::Vehicles()' whenever i use Vehicles to declare an object in my main program also i cant seem to figure out ...
[3 replies] Last: anyoneee (by sky3)
Calculating totals within loops
 
Someone please help: This is the Q: (having trouble with finding total A well-regarded manufacturer of widgets has been losing 4% of its sales each year. T...
[4 replies] Last: Oh, that's exactly what I did. Thanks anyway! (by DanINTP)
by layanM
loop problem
 
i need some ur help guys in this program i need to solve this using loop 1) Input N numbers 2) Calculate and display the sum of N numbers 3) Calcul...
[3 replies] Last: help guys in this program i don't have the code Well you should... (by giblit)
March 2014 Pages: 1... 678910... 79
  Archived months: [feb2014] [apr2014]

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