General C++ Programming - May 2015 (Page 10)

by Ozzy69
what the different of heuristic and meta-heuristic?
 
Hi, i liked of know what the different of heuristic of meta-heuristic
[1 reply] : Hi, the meta-heuristic is 'at another level'... This means the followi... (by minomic)
by sly858
Not sure if possible but..
 
A program i recently wrote for class was a grade book into a text file where I would have the user enter the Score earned for the class and then I would calcula...
[2 replies] Last: Thank you very much didn't think of that (by sly858)
Finding non prime numbers
 
The program is suppose to find the non prime numbers between two integers. It runs, but nothing comes out after i input the two integers #include <iostrea...
[3 replies] Last: Hi Kevin, This now your 3rd post about the same question, just keep o... (by TheIdeasMan)
Help conditioning CIN stream
 
I am working on a simple calculator program, and would like to support conditioned CIN input streams, i.e. only allow whole integer submissions and no letters e...
[no replies]
Transferring ownership of objects
 
I'm fairly new to RAII, and I have a class (let's call it A) which contains an std::array which has four std::shared_ptrs to four objects of another user define...
[6 replies] Last: This pile.insert( std::end(pile), std::m... (by JLBorges)
by yj1214
Questions about freeGLUT
 
freeGLUT comes with a include folder that has glut.h, freeglut.h etc. It seems like both glut.h and freeglut.h woks fine. What's the difference between these...
[no replies]
Help with displaying error message
 
Hello, I am working on a program for a historical society to allow them to log artifacts in their museum. I have implemented a search function so they can see a...
[1 reply] : Have you considered to use exceptions? http://www.cplusplus.com/doc/t... (by Bdanielz)
Kindly help me in function program.
 
the following attributes and functions of the class Time: Attributes: • int hour • int minute • int seconds Functions: • void setTime(int, int, in...
[1 reply] : Will you please stop giving us all homework in the hope that we will k... (by shadowmouse)
linked list data structure.code for linked list data structure
 
Kindly provide me the proper code (solution) of this particuler problem.thanks Problem Statement: A Linked list is a dynamic data structure that consi...
[no replies]
'file' was not declared in this scope
 
Hi, I have a problem and that I can not declare the file, I appreciate it cast a help. string str; string buscarNombre; string hacerOpcion; string emp...
[2 replies] Last: Thansk, problem result (by YuseTist)
Converting char to unsigned int
 
Hello, I have a character array containing hexadecimal digits, and I need to convert it into an unsigned integer. I thought there must be a way to do this, if ...
[2 replies] Last: Hi, I just tried to implement something myself. Can`t I just use bina... (by pacman169)
by Manga
library help
 
So I have been studying c++ for a couple of years now and think it is time to learn to build and use my own library file. I am using vs2012. I basically want...
[8 replies] Last: It works!! Thanks to all for your patience and guidance. (by Manga)
How to search for a string in a text file and return a value in its line??
 
I'm very new to this so forgive me if this is a dumb question but is there a way to search for an instance of a string "XYZ" in a text file, increment to the fi...
[1 reply] : read the file line by line: http://www.cplusplus.com/doc/tutorial/file... (by mutexe)
Need to find prime numbers between two numbers
 
The program works, but it includes the two number I input. I have to find a way to stop the program from outputing the input numbers. #include <iostream> ...
[4 replies] Last: First you need to figure out which of the 2 numbers entered is the sma... (by Momothegreat)
Serializing any object (including from classes from external libraries)
 
Hi folks, I'd like to know if there's any way to serialize (or more generally speaking, save to file) an object without having to modify its class. Now,...
[6 replies] Last: I was looking for something along the lines of template <typename ... (by PossumPlusPlus)
Program finds size of matrix from entry
 
I am new to C++ and want to write a code in which the user types in a matrix and the program uses this information to figure out the matrix size ( and then uses...
[1 reply] : for variable matrix size, dynamic allocated memory can be used. but y... (by anup30)
Finding volume or surface area of a sphere
 
Need help. Cant seem to get this to work. The program is suppose to find the volume or surface area of a sphere with a radius input. #include <iostream...
[2 replies] Last: Adding a return value for the two functions will not solve the problem... (by admkrk)
Dynamic array crashes program
 
I am attempting to write a library that loads a map. I load a file, and set its contents to a dynamic array. When I print the X and Y position of the for loop...
[1 reply] : You aren't assigning i to 0. for (int i; i<y; i++){ Also I would... (by Hippogriff)
by dfg221
bool variable?
 
The code below is supposed to find a small string inside of a larger string. And it has to output the position in which the smaller string was found and the amo...
[8 replies] Last: #include <iostream> #include <string> bool find( std::string bigger_... (by JLBorges)
Class error while working with structures
 
I'm getting an error saying that my expression must have a class type and I'm not sure why. Looks like the error is coming from within the displayTotal function...
[1 reply] : 'totals' is defined as a local variable inside main, so 'displayTotal'... (by CLman94)
May 2015 Pages: 1... 89101112... 22
  Archived months: [apr2015] [jun2015]

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