General C++ Programming - November 2018 (Page 8)

Very Hard Queries (Problem From Contest)
 
I need help in solving the following problem which was asked here - https://www.interviewbit.com/problems/very-hard-queries/. You are given an array A having...
[1 reply] : What kind of numbers have an odd number of divisors? If you're not sur... (by tpb)
by mearvk
Nana UI Library
 
Nana uses the basic_types.hpp for nana::rectangle and others. Trying to compile this into a libnana.a I find leaves the source code in the .hpp file out. The ...
[8 replies] Last: We compiled the libnana.a via Netbeans 8.2. It does have references f... (by mearvk)
How to grab random line from a .txt file?
 
Hello there, I am struggling with figuring out how to grab a single line from a .txt file at random. The .txt file has 20 lines and each line has a name, essent...
[4 replies] Last: Thanks for the help! (by sankarl)
High performance parallel for as possible as standard
 
Dear experts, This is so basic question, so that I would appreciate it if you could answer to me. I am implementing parallel procedures, particularly so c...
[5 replies] Last: Dear JLBorges, Thank you for your reply. They seems so practical for... (by Mitsuru)
Audio Analyse library
 
Hi, i want to write an App for Android that can analyse Audio. There is no need for Speech recognition, i'm more interested in bpm, frequency,... values from...
[5 replies] Last: I'd say fftw is easier to set up than ffmpeg Yeah, I absolutely agre... (by mbozzi)
Polynomial
 
Im having trouble getting my program to rerun an insert function. cout << "Enter the coefficient and power of a term (0, 0 to stop): "; cin >> c >> powe...
[1 reply] : Your condition is NOT C AND NOT P. (where C means c == 0 and P means ... (by tpb)
USB Passcode
 
I was wondering how to make a program that when I plug in my USB drive the console then spits out a specific passcode that is set in the USB itself. But not bef...
[2 replies] Last: I am using windows 10, with visual studio 2017 community. (by Dawsoncodes)
Can functions be applied in this scenario?
 
Hello! Is there any way to make one small function out of all of the cases inside case 2 to make the code less redundant. Also, how can I make the "Would you li...
[3 replies] Last: Some functions always return a value. Other functions return no value ... (by keskiverto)
Class
 
...
[7 replies] Last: as I got it, use string then you will not face such issues. (by divya123divya)
LOOPING IN LOG-IN AND MENU THAT I WAS STUCK RIGHT NOW
 
//*PS. MY CODE WASNT THAT FINISH YET IN MENU OF B,C, AND D*// #include <iostream> #include <string> using namespace std; int main () { string un,p,cho...
[1 reply] : 1. Use [co de] tags when you post code (see the <> icon on the right... (by salem c)
by libi
error check
 
I am calculating a full expression regardless of spaces. So I have a program that accepts a string ex: "56 + 67", and passes it by reference to a void function...
[2 replies] Last: ahh I see! I missed that. Just took it out and replaced it with for(... (by libi)
by stav
Threads not executing
 
Hi, im learning about c++11 multithreading and i tried writing a threadpool class that just creates 8 threads that each print to stdout but for whatever reason...
[2 replies] Last: oh my god.. thank alot haha (by stav)
Hash funciton
 
I wrote this code to for HW. I'm supposed to do a hash function and display information about the searched ship, first I have to get the data from a file and th...
[5 replies] Last: Thanks, guys, not only for telling me what was the issue but also for ... (by MrRobot)
by mbozzi
What's (probably) in C++20: San Diego Trip Report
 
The recent ISO C++ committee meeting in San Diego ended yesterday, and marks the C++2a feature freeze. Barring anything unexpected, this means that the committ...
[1 reply] : Here's hoping modules make it to C++20. Visual Studio 2017 has modu... (by closed account E0p9LyTq)
adding letters randomly into an array
 
How do I add letters from A-Y in random places in a 2d array that has 50 columns and 10 rows? void playersgrid(char two ) //, char three ) ...
[2 replies] Last: #include <iostream> #include <string> #include <random> #include <alg... (by JLBorges)
by volang
MYSQL INDEX
 
Hello guys! I have a table with two columns and 150 000 000 rows. Now I wonder, If I create a index for one of these colums, does this mean it will give me 1...
[6 replies] Last: helios, thank you (by volang)
No throw exception
 
I keep getting a no throw exception for the code I am writing for matrix multiplication. The error is happening in my display function where my cout statement i...
[1 reply] : Please don't double post. http://www.cplusplus.com/forum/beginner/2457... (by lastchance)
Abstact class consturctor
 
I have the following class hierarchy. Vehicle is an abstract class which has a constuctor. The derived class has a constructor which adds one more member. When ...
[1 reply] : @wolfie16, When I try to compile your code I get a whole plethora of e... (by lastchance)
How does rand() and srand() working?
 
#include<iostream> #include<stdlib.h> using namespace std; int main() { int random = rand(); cout << "\nSeed = 1, Random number = " << random; srand(10)...
[1 reply] : Essentially like these: #include <iostream> size_t index {}; size_t ... (by keskiverto)
Assignment Help - Code Inside
 
Good day everyone, I have a c++ Assignment that says: Write a program that will have two user defined functions. One function will allow the user to enter int...
[3 replies] Last: Thank to you all, I apologize for not replying earlier, I couldnt reco... (by KingReno)
November 2018 Pages: 1... 678910... 12
  Archived months: [oct2018] [dec2018]

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