General C++ Programming - April 2020 (Page 9)

Problem to connect Compile Instruction
 
Dear Community, I have a little Problem to connect Compiler Instructions for g++ on Linux Ubuntu Min...
[1 reply] : More info than "it wouldn't work" might be helpful. Try g++ -std=c++1... (by dutch)
cout arrays
 
Is there a way to cout an array? void displayPrice(double money ) { for(int i = 0; i < 5;...
[12 replies] Last: #include <iostream> template <typename T, size_t SIZE> std::ostream&... (by deleted account xyzzy)
Help rewriting a 2d array
 
I need to split up a 2D array into a smaller 2D array, where every other column is rewritten to a ne...
[3 replies] Last: Got it! Thanks! (by wallid soukaki)
Using a double linked list in a different class
 
Format:https://www.geeksforgeeks.org/doubly-linked-list/ I am trying to get more comfortable with d...
[7 replies] Last: Thank you very much for your help. I appreciate it. (by ilikesweets)
*pointers with arrays
 
Hello everyone, If you have a pointer that points to an array and you are making a function. You...
[13 replies] Last: Hopefully, your array is not called "array", since this is a keyword. ... (by zapshe)
Different outputs using URLDownloadToFile
 
Hi, first time here, new programmer. I am trying to download online html pages and then search aft...
[3 replies] Last: Sometimes the html is generated by JS, which the browser executes but ... (by thmm)
Primitive geometry and mesh generation in C++
 
Hello All What I trying to do is , generating some primitive 2d shapes and show in the gui with dim...
[3 replies] Last: Oh, I see. I'm not sure of a suite of programming tools for FEM. But h... (by Ganado)
Need Help Sorting Strings From Array By Increasing Length
 
So for an assignment, I have to mod a selection sort algorithm to sort an array of strings by increa...
[6 replies] Last: Integer vs string. You create string B. A copy. That is fine. Let me ... (by keskiverto)
by quakig
void** to float** or double**
 
Hi I am new to C++. Here's my situation. I have to create an array of array named m2DArray. It ha...
[7 replies] Last: Then at runtime I decide between float** or double** based on some lo... (by Enoizat)
by doug4
Derived Class with Derived Member Object
 
I want to have a base class that contains a member object. When I extend the base class, I want the...
[2 replies] Last: Thanks! That's what I was looking for. (by doug4)
Insertion Sort time complexity is O(n) in Best Case
 
Why Insertion Sort time complexity is O(n) in Best Case? The best case for any sorting algorithm ...
[no replies]
Bubble sort have O(n) time complexity in best-case
 
Why does Bubble sort have O(n) time complexity in best-case performance? The best case for Bubble...
[no replies]
Help passing array to main function
 
#include <iostream> #include <fstream> #include <string> #include<ctime> //for rand and srand #incl...
[5 replies] Last: I've managed to workaround this solution with vectors which is probabl... (by Toddinator716)
Help me identify algorithm
 
I am a novice programmer, and I am trying to implement a finite element solution. I think I am tryin...
[2 replies] Last: My drawing was basically trying to represent a flow chart map. You sta... (by sakonpure6)
How do I implement a variant version of the insert function in an binary search tree?
 
I am trying to implement the insert function in my bst.template file. I haven't implemented anything...
[3 replies] Last: Why does it matter? And where's your attempt? if(item) is not an att... (by dutch)
Ned help regarding passing object referance
 
I have a class whose member is another class' object like below class test { A aobj; voi...
[3 replies] Last: similar cyclic dependency asked on http://www.cplusplus.com/forum/ge... (by marhuum)
Efficiency and optimization in assignment inside the condition
 
Is efficiency and optimization in assignment inside the conditional expression quite significant ? H...
[2 replies] Last: It has nothing to do with efficiency. If you remove the semicolon on l... (by Peter87)
Heaps and time complexity
 
Hi guys, so below I have created a minheap, anyhow from what I have read they say that to poll...
[11 replies] Last: Is that a kind of "amortized time"? I don't think so. The average cas... (by helios)
by DeeMoo
How to make object movement smoother?
 
Hi! My problem is that when i move my board (which is the rectangle) it is very choppy. My board wil...
[1 reply] : see if you can move less far per go, and reduce the sleep. you should... (by jonnin)
C++ Riemann Sum Problem
 
Hello, The code below is supposed to calculate the area under the curve. I managed to get the cod...
[2 replies] Last: which begs a general point: you don't usually want to compare doubles ... (by jonnin)
April 2020 Pages: 1... 78910
  Archived months: [mar2020] [may2020]

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