General C++ Programming - March 2017 (Page 15)

struct template in function template
 
Hello People, I want to use a function template which returns a structure template. The situation is as follows: #include <vector> // std::vector t...
[2 replies] Last: Thanks Cubbi. Yes, you are right, I should have used v .resize(column... (by dariodem)
Get audio input volume
 
Hi everyone, i already found this article: http://www.cplusplus.com/forum/general/152940/ That register audio input in a bin file. But what if i want to get ...
[no replies]
Need Help Converting Strings from an Array into a char array (1-D).
 
Name | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |Total --------------------------------------------------------- Jenny | | | | | | | | | ...
[7 replies] Last: You might want to check with them... Could be a good move as the exe... (by closed account 48T7M4Gy)
by LongDo
Class and Object
 
I have some problems with my homework Consider the following definition of the class myClass <class myClass { private: int x; static int count; publi...
[1 reply] : struct A { static int i ; static int foo() { return i ; } }; int A::... (by JLBorges)
by RNBW
Analyse a beam(Part 2)
 
Here is the program: (sorry I can't get the code <> brackets to work!) //************************************************ // ANALYSIS OF SINGLE SPAN, SIM...
[1 reply] : Refer this thread: http://www.cplusplus.com/forum/general/210417/ (by closed account 48T7M4Gy)
Union of two Sets
 
I am having trouble understanding how the union is working out. When the union occurs, my set 1 is traversing to its last element then being added, then set 2's...
[1 reply] : I don't see anything right of but your + (union) operation seems funky... (by jonnin)
PPP2 Chapter 11 Exercise 16
 
I need to know how to check how many times numbers were entered and print the numbers out from least to greatest while printing how many times a number that was...
[13 replies] Last: Okay, the errors were taken care of, but now there's a logic error; he... (by DragonOsman)
Performance question (vector.size() in loop condition)
 
Hello People, In performance terms, ¿What is the correct/best way of doing loop control? for ( int i = 0; i < v.size(); i++ ) {} or limit = v.si...
[12 replies] Last: Thanks for the useful links Cubbi (by dariodem)
Converting a string from an array into a char array help!
 
How do I turn a string that is stored in an array into a char array? I've found plenty of information on how to change a string literal but not from an array. I...
[2 replies] Last: Duplicate post Bad http://www.cplusplus.com/forum/general/210361/ (by closed account 48T7M4Gy)
PPP2 Chapter 11 Exercise 5
 
These are the specifications: Write a program that reads strings and for each string outputs the char- acter classification of each character, as defined b...
[12 replies] Last: Thomas' one is perfect for me. Thanks, man. (by DragonOsman)
Binding an rvalue to cout
 
I am seeking a general-purpose way to bind an rvalue (such as a function return value) to cout. Eg: Consider the following class: struct A { int ...
[12 replies] Last: Yes, accepting a constant reference parameter is the most correct solu... (by mbozzi)
Snake game!!!
 
I set two if statements in the logic function in case i hit the wall or i eat a fruit represented with "F" but when i run my program nothing happens.Why? #in...
[1 reply] : The ifs on line 103/107 are within the switch statement. They will nev... (by coder777)
two dimensional integer array: sudoku with empty space
 
Hello all, I want to write a function which solves Sudoku and for testing I declared a two dimensional array as follows int sudoku = { {2,' ',' ',8...
[2 replies] Last: Hello, yes -1 an '' are used for empty cells. The code works now but I... (by andre herg)
Why is the output empty?
 
#include <iostream> #include <cctype> #include <cstring> using namespace std; void mycode(char msg[ ],char ch) { for (int cnt=0;msg ='\0';cnt++) ...
[2 replies] Last: Thank you so much! (by Anne693)
what's wrong with this following prototype?
 
int askNumber(int low = 1, int high);
[2 replies] Last: You might be able to achieve what you want by overloading the function... (by cire)
3D array question
 
How are values visually stored in a 3D array? If I have a int a = {1, 2, 3 ... 18} FRONT: 1 2 3 4 5 6 7 8 9 BACK: 10 11 12 13 14 15 1...
[1 reply] : c++ is row major, and everything is stored in 1 dimension. a 1d arr... (by jonnin)
by Murozo
C++ Basic Paint Program Video
 
Hello.Your Watch Like...... https://www.youtube.com/watch?v=ZxTveEH5Hes&t=109s
[no replies]
Help With C++ Project!
 
Heres the question! Bit Manipulation Lab 7) Allow the user to input 8 integer values all between 0 and 15 inclusive. Store these 4 values into a singl...
[7 replies] Last: Here's a C++98 version of the same program # include <stdint.h> # inc... (by mbozzi)
How to add time in Milliseconds?
 
I'm making a linear search program and I can't seem to get the right time elapsed. This is my linear search algorithm without adding the time. I need help on ad...
[7 replies] Last: thank you JLBorges, very clearly illustrated (yet again!) edit: i mus... (by gunnerfunner)
by Anasky
Physically-based rendering library
 
I was wondering if there is an existing library to perform physics-based rendering. So far I've found engines that do (such as Unreal Engine 4), but haven't yet...
[no replies]
March 2017 Pages: 1... 1314151617... 19
  Archived months: [feb2017] [apr2017]

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