Beginners - May 2016 (Page 31)

by jkcalz
Accept user input to open file
 
I'm trying to accept user input to open up a .dat file that's in my source files but I don't know why the file keeps failing to open #include <iostream> ...
[1 reply] : Try this to see a better error msg. #include <stdio.h> if (!inputFil... (by Thomas1965)
multiple definition of template specialization
 
Hi, I'm reading that when you fully specialize function templates or members of class template you only have to put declaration of that specialization in the he...
[2 replies] Last: Ohh yea, splitting function.h into h and cpp files made it to "work"! ... (by etrusks)
how to make array from elements inside another array
 
how to make array from elements inside another array ???
[4 replies] Last: Conceptually: for interesting elements in foo bar[ fbmap(index) ]... (by keskiverto)
Question about inherritance
 
Suppose a class named Tiger is derived from both the Felis class and the Carnivore class. Here is the first line of the Tiger class declaration: class Tiger :...
[1 reply] : I think the Felis will called first because it declare before the Car... (by TheIdeasMan)
Practice problem for midterm
 
I'm currently doing a practice test for a midterm and cannot figure out why line e outputs to 4. Could someone please explain? Thanks. #include <iostream>...
[2 replies] Last: Thank you (by bnaranjo)
Cannot convert `float*' to `float' errors
 
Hi I keep getting these 3 errors that I'm not sure how to debug: ERROR: In function `int main()'; ERROR: Line 44: Cannot convert `float*' to `float' for argu...
[4 replies] Last: Thanks for the help everyone. I implemented the changes to the functi... (by quantumleap)
how to get max and min dates when i have days,months and years arrays
 
how to get max and min dates when i have days,months and years arrays. i want most general code so pls tell me your steps of thinking . only <iostream><cmath>...
[3 replies] Last: thanks all for ur answers both i apperciate it. (by madomado60)
Turtle graphics
 
I am stuck at this point and really need help getting back on track. Below is the assignment details followed by the code I have written so far The turtle ho...
[no replies]
Text Based RPG using dynamic binding
 
Hey guys, I am making a RPG Game in which there are 6 different creatures with different abilities. I have the main coding down, I need a little help decrementi...
[8 replies] Last: Thanks for reminding me of that! I almost missed it! Thanks for all yo... (by hookster007)
Outputting a called Function
 
Hey guys I have a function tomorrow(); in a Date.cpp class that I would like to call in my Employee.cpp class. The Function looks like this void Date::tom...
[7 replies] Last: I got it! Thanks Abstract, you've helped a lot! Have a good day :D (by hookster007)
Comparing Const Chars
 
Okay, so I've been working on my final for days, and I've gotten it to run without errors or crashing, but I have this little section here I'm having trouble wi...
[19 replies] Last: The file comes from another function where the user chooses what ID, T... (by BonsaiSuperstar)
by kr95
Please Help, Random Numbers
 
Hi! Ok so I am having a problem with my code. It's requirements are to put out 100 random number (but these numbers need to be between 1 & 20). My code works in...
[2 replies] Last: No that makes so much sense, just changed it to a J. Thank you so much... (by kr95)
Getline in input file
 
Hello, in a cinema booking system using c++ we read a .txt file containing movie names and info using ifstream the structure of movies is struct movie { str...
[6 replies] Last: i cant add spaces between the words or each word will be added in the... (by AbstractionAnon)
2D Arrays
 
What's wrong with my code???? Hi, I'm a new programmer, my professor gave me the following assignment: Assume 3 teams and 5 games. Declare these as constants. ...
[no replies]
by Sayay
Help to create Class in C++
 
hi there am anew user i need help to crate C++ Design a class pass called student with the following data member, First name, Last name, Regstration number...
[4 replies] Last: THANKX GUYS for the reply (by Sayay)
by ferrad
1-based to 0-based array in a function
 
Numerical Recipes has a heap sort function below. It sorts an array [1..n], however C arrays start at 0, and I would like to modify this function to deal with ...
[10 replies] Last: One of the many reasons I consider C/C++ as very dangerous odd languag... (by ferrad)
Issue with an algorithm and returning the value
 
The issue lies within my .cpp file (not the tester or header). Basically I go to run it but it says I need to return a value. I'm confused as to what exactly ...
[3 replies] Last: Well, what is it you expect to be returned at that point? An empty st... (by AbstractionAnon)
How to use <chrono> in order to see how much time a function took to execute
 
I have to compare the time differentiation between bubble sort, selection sort, linear search, and binary search functions. I have already completed all of my f...
[5 replies] Last: Ignore valid (or any) output while making performance measurements. F... (by JLBorges)
simple function assignment
 
Hello. I am new to the forum and programming in general. I have read the instructions for posting, but if there is any deviation from the posting rules plea...
[9 replies] Last: I see what you mean. modifed the code again. sorry for the wrong form... (by AllramEst)
by Zorac
Allocate memory in 1GB-chunks and 1kB-chunks.
 
Hello everyone! I have a assignment where i am supposed to allocate memory in different size-able chunks, or so i think. Something like the size of the blocks s...
[2 replies] Last: Well i am not sure to be honest. Based on how my assignment is i assum... (by Zorac)
May 2016 Pages: 1... 2930313233... 36
  Archived months: [apr2016] [jun2016]

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