General C++ Programming - November 2014 (Page 19)

c++ Whats the proper way of finding a max value in a vector?
 
This is part of my main code that is giving me compiler issues. //Find max value max = max_element(vecTemperature.begin(), vecTemperature.end()); I keep ...
[2 replies] Last: In addition to one JLBorges said, you could sort it by greatest value ... (by Immo)
How to Read/Open Old-Style JPEG Compressed TIFF FIles Using LibTiff in C++
 
I have created TIFF Reader using libtiff in c++. Now I have many tiff files with old-style jpeg compression that has to be read/open using libtiff in c++. I gu...
[5 replies] Last: Thanks I Can now read old style jpeg images successfully. (by gopikanna)
by winoon
Read from a file and display on a file (File I/O)
 
Hello everyone. For an assignment, I'm supposed to read the file, compute the needed information (min, max, avg) and output to a file. I'm completely lost. ...
[no replies]
Some weird memory access problem
 
Hello .. When I return mem add I cannot access the data in that add: in bin search tree Curr=findMin(root); cout<<"val: "<<Curr->barcode<<endl;//nothing in ...
[2 replies] Last: I changed it to this and it worked bst::hwareItem* bst:: findMin(h... (by csstudent123)
binary search tree print function: Logic not clear-help
 
Hello. Pls explain to me 1) how come root node is printed when the first call to function goes to left subtree? 2) How it resets to root to go to right s...
[19 replies] Last: thanks :) (by csstudent123)
Trouble printing right output
 
Hi, I'm trying to make a simple temperature converter with a menu that lets users pick which conversion to perform. But, it won't seem to print the right con...
[2 replies] Last: Ohhh, thanks. It worked!!! (by tybalttheappleEater)
Iterative MergeSort not working
 
I am trying to write an iterative MergeSort function. I have already written it recursively. I have to use this "Merge" function for both the recursive and iter...
[no replies]
Need help with 2-dimensional array
 
I am trying to send the last x rows of a 2-dimentional array to a function that receives a one-dimensional array and sorts it. Can anyone help me with this? I ...
[no replies]
Help with Coding
 
Hi, I'm new to this forum, and I was wondering if anyone can help me with some code that I'm working on. This is what I'm trying to do: 1) Develop a linked l...
[2 replies] Last: I think it will make more sense if you create two classes, a node clas... (by dhayden)
Can't get this one to work right. Help.
 
Here is the code that won't seem to work. The errors are below. #include <iostream> #include <algorithm> using namespace std; template <class T, int...
[1 reply] : > class "ONE<char, 4>" has no member "SortArray" you are trying to use... (by ne555)
Overloading Input Operator
 
I cannot get my function overloading the input operator for rational type objects to work. Can anyone help? lab9.cpp: In function ‘std::istream& operator...
[4 replies] Last: I've got it, thanks. (by ldelsignore)
Program to solve quadratic equation using int function.
 
So i'm having trouble just setting up this problem... I dont understand how im supposed to use an int function to do this. The exact instructions for the lab ar...
[2 replies] Last: awesome thanks alot i finished quite quickly after that! (by mnowicki)
OpenGL/SDL: 0xc000007b application was unable to start correctly (compiles flawlessly)
 
I honestly have no idea what is going on here. The libraries all work. no compiler errors, so I have trouble understanding why the application won't work, unles...
[2 replies] Last: Thanks Disch, it seems that was the case, for I repasted the libraries... (by comradejonathan)
inputting a .txt file into a 2 arrays via void function
 
I need some help with exactly what the title says. I have a .txt file that I need to input into two parallel arrays. The first array needs to be on dimension an...
[10 replies] Last: Ty Jim! I was wondering though the way you did it does it allow me to ... (by waketech123)
Organizing student records read in from a file (name capitalization, letter grade, credit, class name etc)
 
I have a student file with this information: johN SMiTh A 3 introductory spEEch B 5 PrecalculuS 1 and 2 A 4 United States GOVERNMENT *...
[1 reply] : Can you post the text document info here? Im stuck on my hw so il try ... (by waketech123)
by kww228
undefined reference to `Calss::function()'
 
As the title states I am getting this error in my program yet I am at a loss and have tried everything I could think of to fix this. Why am I getting this erro...
[1 reply] : 'undefined reference' typically means you are calling a function, but ... (by Disch)
Input Validation: My Program cannot accept negative numbers
 
#include <iostream> #include <iomanip> using namespace std; // Function Prototype void sortArray(int array , int size); void showArray(const in...
[1 reply] : Disclosure: I have not read your code. The latest version of the stan... (by Duthomhas)
File I/O
 
Hello, I need some help with my program. I'm trying to get the contents of one file to another file but right now, it only prints the last word from the origina...
[3 replies] Last: That's still not very clear. How does a letter turn into a number? O... (by Duthomhas)
Doubt on this pointer
 
Hi guys Please explain me the output for this program thanks /* * File: main.cpp * Author: user * * Created on 10 November, 2014, 5:48 PM */ #inclu...
[1 reply] : //BD(int x1, int y1) : BB(x1),bb(y1) //is equivalent to //BD(int x1,... (by MiiNiPaa)
triangular distribution for creating momentum four vector
 
Hello. In my problem I am to create a base class to represent a four vector (a concept in physics involving a four dimensional vector) then create a derived ...
[2 replies] Last: Umm...was this an answer to my question? I don't get it! I just want a... (by maximus123)
November 2014 Pages: 1... 1718192021... 32
  Archived months: [oct2014] [dec2014]

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