General C++ Programming - December 2016 (Page 15)

Please show me the path of this coding
 
This is the coding; #include <iostream> using namespace std; int getdata_two(int c ,int startcnt, int endcnt); main(){ int a = {0,1,2,3,4,5,6......29} ...
[1 reply] : Line 6: main() must return type int . 1) this is function call ri... (by AbstractionAnon)
ppm file to buffer
 
How can i save a ppm file into a buffer byte by byte?
[1 reply] : std::string load_ppm(std::string filename) { std::ifstream handle... (by nchambers)
Implementing a Stack by a single Queue
 
First, please modify the data of CirQueue from fixed-size array to dynamic array. The data size can be specified in the constructor, and the default size is 5...
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
A tricky algorithm
 
The August Shokunin challenge: There are a large number of 9 digit integers in the range 123456789 to 987654321 where each digit only appears once. Your m...
[3 replies] Last: You could use std::next_permutation() defined in the <algorithm>... (by boost lexical cast)
by FKA96
General C++ Programming
 
HI, i've problem with coding the factorial func. Can anyone help?!
[1 reply] : int long long factorial(int const & nr) { int long long fact=1; ... (by Golden Lizard)
Geometric formulas to functions.
 
I need help on a program that tells me to convert the geometric formulas to a function to return the results. I need to use the following: // Return the Circ...
[8 replies] Last: My pleasure. Please take note of the homework comment I made on your o... (by closed account 48T7M4Gy)
new operator confuse
 
visual studio 2015 X64 auto ptr = new char[1024*1024*1024]; it takes about 344ms , ptr is not empty auto ptr = new char[1024*1024*1024*100]; ...
[1 reply] : > it takes only 1ms and ptr is not empty. ptr would be uninitialise... (by JLBorges)
problem answer please
 
Write a C++ program that takes Two numbers from the user as Start and End Variables, then sum the numbers (from Start Value to the End value) to find their Ave...
[3 replies] Last: OK chief, just a few minutes wait, our top homework team is on its way... (by closed account 48T7M4Gy)
for loop i need the answer please
 
Write a C++ program that takes Two numbers from the user as Start and End Variables, then sum the numbers (from Start Value to the End value) to find their Ave...
[1 reply] : OK chief, we'll get onto it right away. (by closed account 48T7M4Gy)
coding for this problem
 
Equation : -0.87 sin (4x) - 0.56 log (4x) + 1.32 ln (5x) Range of x : 8<= x <18 Step of x : 0.100 Generate value of f(x)? Convert to rad? Could the code be m...
[1 reply] : double func( double x ) { return -0.87*sin( 4*x ) - 0.56*log10( ... (by integralfx)
help!!!! thanks
 
i need help in to convert this to: // Return the Circumference of Circle double CCircle(double radius) // Return the Area of Circle double ACircle(doubl...
[1 reply] : these are the the functions for the formula: *** double CCircle(doubl... (by codeerror)
How do I get rid of trailing zeros?
 
I guess the title is pretty self-explanatory. I'm working on a project where I import a file that has a bunch of scrambled (x,y) points, and after reading it I ...
[5 replies] Last: Thank you so much!! I took your advice and was able to successfully co... (by Adela17)
calculate the possible moves of the bishop
 
hi, all can any one help me in this proplem in c++ Nada was playing chess with her best friends. While playing with her friends, she was so good at playi...
[no replies]
Smart pointers and hidden implementation
 
I'm trying to make a private implementation for a vertex class. I am using smart pointers to store its values, but for some reason I can't transfer ownership wi...
[4 replies] Last: The better way to write that constructor is to omit it or default it (... (by Cubbi)
problem answer please
 
Write a C++ program that finds the average hours spent programming by each student in every day over total three days. Note that the program should take the nu...
[3 replies] Last: is this right ? No. main returns type int and you need to re-re... (by cire)
Ís it possible to create a vector from an integer sequence?
 
Hi, Is it possible to fill an array with an integer sequence inspired by an idea like so: (I know it does not compile... it's just an idea) vector<int> ve...
[2 replies] Last: Thanks JLBorges!! As always you provide the perfect answer!! Juan (by JUAN DENT)
Is there a way to inherit...
 
Is there a way for an object of the same class to inherit exactly one attribute. Object is constructed randomly using static function.
[8 replies] Last: > A rabbit father has to give another rabbit kid object his color Then... (by ne555)
I need to raise my grade and it's almost finals, PLEASE HELP!
 
PROBLEM: Techi Gadgets Account Program. (20 pts) Write the Techi Gadgets Account Program. The program will read a text file containing the following account...
[3 replies] Last: Okay, pm me (by Golden Lizard)
Problem with calling a function in a loop
 
I'm trying to call the function ringpling in a loop but the program don't work as it should. What am I doing wrong? #include <iostream> #include <string> ...
[2 replies] Last: Sorry for that I always think that the if-statement is a loop even if ... (by markusfurst)
by kais2
convert from decimal to binary
 
i have to convert from decimal string to binary in class in 3 files here is my program: Decbin.cpp: #include "Dec2Bin.h" #include<iostream> using namesp...
[5 replies] Last: exactly here is my problem i saw some codesn on google but they wasn't... (by kais2)
December 2016 Pages: 1... 131415161718
  Archived months: [nov2016] [jan2017]

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