General C++ Programming - April 2017 (Page 10)

C++
 
I have a problem and I am stuck here. With data status(4 data status e.g: random,nearly sorted) With size(5 sizes) With sorting algorithm(7 algor...
[1 reply] : You should be much more specific if you want help. (by boost lexical cast)
by RezaAb
Unexpected crash!
 
Hi all, I am just modified my CPP project, however, an unexpected problem has occurred. When I run the code nothing happening. I tried the debug mode and g...
[5 replies] Last: as you say there are ... tens of classes in different folders ... ... (by gunnerfunner)
This function will have five parameters passed by value and return the average
 
Write a function that will compute the average of a specific grade type. This function will have five parameters passed by value and return the average. ● Arr...
[6 replies] Last: Something along these lines, perhaps: #include <iostream> #include <... (by JLBorges)
by Kalcor
size_t
 
can someone explain the exact use of size_t for ARRAYS? and after a general explanation I would like a relation to such a code: const size_t max_size = 1...
[3 replies] Last: It is usually the largest unsigned type the system has. It is also the... (by TheIdeasMan)
need help with formatting and math error
 
Sorted by name ID Name Salary ------------------------------------ , $ 2000 Adams, John $15000 1717 Bush, G...
[7 replies] Last: thank you very much for this it helps me learn (by mikeal200)
Coloring a texture in SDL2
 
I develop games using c++ and sdl2 and in this topic i'll try to give more informations possibles about my problem. I have a texture 11x11; A square colored r...
[no replies]
how can I pass the size parameter in my input function by reference, this is the code
 
#include <iostream> #include <cstdio> #include <cstdlib> #include <ctime> #include <math.h> #include <fstream> using namespace std; //pass ...
[1 reply] : void inputData(double score , int type , int max , int & size) A... (by closed account E0p9LyTq)
Trying to calculate depth, deepest, for binary tree
 
I'm trying to write something to determine the largest depth of a binary tree but far have only ended up with one thing that keep giving back the number of node...
[3 replies] Last: @mbozzi: That's what I would have normally done but its a one piece of... (by sonar87)
by LongDo
Streams and Files
 
What are the differences between file.read((char*)buff, sizeof(buff)); and file.read(reinterpret_cast<char*>(buff), sizeof(buff));?? And when to use them?
[no replies]
by Kalcor
Array input stopping
 
Hello, I was solving this problem: Write a program that accepts characters from the user and inputs it in an array. It terminates when the user enter “0” ...
[3 replies] Last: Like coder777 suggested, instead of setting the char to ' ' , you can... (by arg0d)
larger than n
 
alright fellow programmers turns out my reading comp skills suck because I came to class thinking I was done and I was sorely mistaken lol the book asks: c...
[6 replies] Last: i think that is it! thank you so much for your help! (by kohl5555)
app development using sdl2
 
I'm mostly finished with my app in C++/sdl2. but how do I add the possibility for a user to buy the premium version in app? and how do I add it to googl...
[2 replies] Last: But do I need to follow all the steps on this page in order to be abl... (by coder777)
need help finishing the c++ program (1,2)
 
#include <iostream> #include <fstream> #include <string> #include <cctype> #include <cstdlib> #include <algorithm> using namespace std; int get_file (ifstrea...
[23 replies] Last: http://www.cplusplus.com/forum/general/213121/ (by closed account 48T7M4Gy)
by tutkal
I need your help !!
 
Can you help with the course project Number Guessing Game Purpose of the game, Memory of In the computer find different from e...
[1 reply] : Can you help with the course project afraid not or at least not unl... (by gunnerfunner)
How to split a file other that .txt extension using C++ code
 
I've been looking for a solution to split a file with any file format, using C++. what i've found so far and tried as well, could only split .txt file. To split...
[2 replies] Last: you can split it easy enough -- we used to do that to fit big files on... (by jonnin)
Is this Hill Climbing Algorithm code?
 
Hello, just wanted to know if the code below is considered hill climbing. calcCost (int ArrayOfCities , const int NUM_CITIES) { int c = 0; for (in...
[2 replies] Last: Thank you Marine :) It's nice to see you're still around! :p I tried... (by Maima Van Persie)
Beginner in a c++ course, and deeply confused with how this program should go.
 
Your program uses a function fillArray to get no more than 20 characters from the user and store them in array char a , and then display on screen those charact...
[10 replies] Last: Ah ! I got it! Thanks so much for the help :) #include <iostream> #i... (by wafflecone)
by Mr Ez
Compare Two Different Program
 
Dear All I have a task, to compare time for search a data in 2 different method data search (sequential and binary search), there are program for compare two...
[6 replies] Last: > but why the ouput always 0s ?? The code that is being timed execut... (by JLBorges)
How Do I Create A Function That Randomly Chooses Array Location?
 
Hey all, So currently, I am trying to create a bool function, passing in two-dimensional array. I am trying to make it so that this function will generate a ra...
[1 reply] : Here is my code, in the second function I assign the two variables Row... (by Beyond Humanity)
by Borneq
How to terminate thread after timeout?
 
I connect to database in thread. Standard threads <thread>. I am waiting for termination : thread.join(). But sometimes I must wait infinitely. How to termina...
[2 replies] Last: I can't use join or condition variable because in thread I have databa... (by Borneq)
April 2017 Pages: 1... 89101112... 16
  Archived months: [mar2017] [may2017]

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