General C++ Programming - May 2018 (Page 3)

Right to left isolate string
 
I am facing a tough problem with Farsi unicodes. I have an std::wstring s = (L"\u0634\u0646\u0628\u0647"); which is a Farsi word. When I debug it, I see that...
[1 reply] : Try \u202B (RLE: right-to-left embedding) at the start of the string... (by tpb)
Accessing class member in 2d array
 
I have a vector declared as std::vector<std::vector<std :: vector <chunk> > > chunks; This works, and for the sake of initialising works fine. I can fill it o...
[3 replies] Last: You've shown a 3d vector but have only used two indices to access it. ... (by tpb)
Accessing class member in 2d array
 
I have a vector declared as std::vector<std::vector<std :: vector <chunk> > > chunks; This works, and for the sake of initialising works fine. I can fill it o...
[3 replies] Last: Now I feel stupid that makes alot of sense, thanks heaps. (by tristan1333)
Finding all complex roots of polynomial of nth degree
 
Hey folks, so, I am very new to programming in general, but as I am graduating in theoretical physics there is no getting around it anymore. My problem is fi...
[5 replies] Last: I don't understand. Why would you need to type the coefficients in? I ... (by helios)
Extraction of Numbers from array
 
Hello guys, i'm a newbie here. I have an assignment to write a C++ program to extract nos 76,89, 23 & 1 given the table below 5--7--8--9 1--7--6--4 0--2--3-...
[11 replies] Last: There are more untold possibilities. The "extraction" sounds same as "... (by keskiverto)
Need To Generalize code and solve determinant
 
Dear all, Thanks to "tpb" he provided me with code that read the equations and sort them in an array and I have added up operations that are done on this equati...
[12 replies] Last: Thanks all for your concern, actually this is too advanced for my proj... (by ahmedm512)
How to handle a bunch of threads?
 
Hello there, I want to start a bunch of threads, but i don't know how I could do this. Here is my try. I would be glad if somewhere could help me. #includ...
[4 replies] Last: For the sake of completeness - if some other searches for the topic he... (by nuderobmonkey)
by Lex33
Activity Diagram Problem
 
Indicate the C ++ code to the following activity diagram (a-h are statements or conditions; note: first code in advance on the lube / reverse side, then correct...
[8 replies] Last: while(1){ if(a){ b; } if(c==true){ e; continue; } else(){ d; break; } ... (by Lex33)
boost issue when compiling a project
 
hey everyone i am trying to compile a qt project on os x 10.13.4 and have tried boost 1.57, 1.59, 1.60 and 1.66, here is the error i need help with In file i...
[2 replies] Last: well looks like for whatever reason xcode on mac installs c++ 4.2.1 fo... (by ironsniper1)
by BlitzN
Very simple text editor
 
Hey, Im looking for a very minimalistic and simple text editor (i used to use vim and sublime) Any suggestions?
[3 replies] Last: vim is still available on both linux and windows. (by doug4)
Making a class behave like a lambda .. stuck please help
 
Hi, I have the suspicion that every lamda is actually implemented as a class, so i am taking a lambda and trying to represent as a class, but I am running ...
[10 replies] Last: Ah yeah, my bad! I forgot that you can't pass functions as references ... (by TwilightSpectre)
How To Run SGESV Program? (1,2)
 
Hello Profesionals, Good day. I am trying to run this kind of program from Intel. https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl...
[22 replies] Last: Thank you very much Sir for your advice. It worked properly fine now. ... (by kindgnice)
Method of Type Array
 
is there any way to return arrays from functions? (Like this, not with any star operators) class Temp{ public: static float getNewArray (){ ...
[5 replies] Last: This does not seem to have any "stars": #include <vector> int main()... (by keskiverto)
by rubili
RLC circuit analysis
 
Hi everybody! I have a assignment that needs your help. I have to build a program using C++ to analyse a random R,L,C circuit. The circuit structure is descri...
[7 replies] Last: Based on @Ganado's circuit; numbers taken from the second example in h... (by lastchance)
Problems with Stacks.
 
The program I've written manages to print out a few, then spits out the Stack Empty error. I suppose I just need a second pair of eyes to tell me where I messed...
[2 replies] Last: Thank you very much! (by ScottyYDg)
Need for move constructor and also operator=?
 
Hi guys I am reading this tutorial https://stackoverflow.com/questions/3106110/what-are-move-semantics he says when we use the copy assignment in this exampl...
[5 replies] Last: sorry again just a follow up I re read both articles a few times and t... (by adam2016)
iterate through vector of struct and multiply
 
i am trying to use vector iteration to preform the function below. none of the vectors are of a set size so they must be able to preform the iteration and funct...
[10 replies] Last: i have figured it out some of you came half way but none of you found ... (by ReaperSoul)
Write and read (binary) a vector containing class to a file.
 
Hi all! So here is my question, I have a class that contains a vector that holds multiple vectors of char. I want to write & read that class to a file in bina...
[8 replies] Last: That isn't true at all. You can write strings to a binary file all da... (by jonnin)
by samo21
Task for school
 
Hello everyone,my teacher gave me following task: Write a program which will create a ellipse with sizes writen in text document.So for example the sizes in tex...
[7 replies] Last: Ganado thanks a lot man for your post,thats exactly what i needed also... (by samo21)
average rainfall
 
Average Rainfall Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of a data file that t...
[1 reply] : You are supposed to read the filename not the name of the months. Then... (by Thomas1965)
May 2018 Pages: 12345... 11
  Archived months: [apr2018] [jun2018]

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