General C++ Programming - March 2018

how using vectors?
 
i'm trying using an int vector: vector<int> vecPriority; int OperatorCount=0; if(chr =='*') { vecPriority.push_back(Operato...
[2 replies] Last: thank you so much for all. i fixed that and more on code. thank you (by Cambalinho)
can i convert a string to an arithmetic expression?
 
can i convert a string to an arithmetic expression? or i must do it on hard way?
[10 replies] Last: i found the other error: void CalculateExpression(string strMathExpre... (by Cambalinho)
my homework
 
/* * *********************************************************** * * Programming Language, second semester 2017-2018 * Homework: .... * Exercise: ....
[1 reply] : First, please use code tags when posting code. See http://www.cplusplu... (by keskiverto)
by lexon
Vector does not name a type
 
I am trying to make a class where it will take in a text file of coordinates and find the perimeter of the shape. When i compile this section of code i get an e...
[1 reply] : vector is part of the std namespace. Change to std:: vector<int> ..... (by Ganado)
c++ vector
 
If I have a vector and i iterate throw the elements : for (i = 0; i < v.size(); ++i) , does it calculate v.size() each time and lose execution time ? im saying...
[3 replies] Last: On one program I was working on, there was a vector that contained a b... (by Ganado)
by kkkcen
phrase guess game in C
 
...
[1 reply] : you need a way out of the loop if they win. so you need to do some mo... (by jonnin)
i'm confused with 2 keywords
 
i'm review the C++(reading the book). theres, for now, 2 things that i really didn't understand: 1 - what really means constexpr? 2 - what really means inlin...
[8 replies] Last: thanks for all to all (by Cambalinho)
by kada17
Standard output function template
 
I am trying to code a function that takes in a range of values and prints them using std::cout. This is the prototype template < typename T > void Output(cons...
[3 replies] Last: What is your compiler? Older GCC defaults to older C++, but can be tol... (by keskiverto)
cannot convert from 'TCHAR [260]' to 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>
 
error C2440: 'initializing': cannot convert from 'TCHAR ' to 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>> I get this error, b...
[2 replies] Last: My recommendation is to just not bother with TCHAR and just call the w... (by helios)
Using reinterpret_cast to read file into structure
 
struct DATAs { char data1; short data2; short data3; float data4; int data5; short data6; unsigned short data7; short data8; ...
[4 replies] Last: Ah, now I get it. Thank you again ! (by warchief)
Reverse By Word In Dynamic character Array
 
Hey guy, this is the first time i am going to post here, so let me get straight to the problem I WROTE THIS : void ReverseByWords(char *Arr, char *&RArr) ...
[2 replies] Last: It' a reasonable algorithm as long as you don't mind filling the input... (by tpb)
Is there methods to get ost to pst converter?
 
I have to make ost to pst conversion. My friend asked me about it.
[1 reply] : sounds like a 'fun' project. This may be fairly involved, you will ne... (by jonnin)
i need a simple correction about strings
 
the literal string: "hello world" it's considered a const char*? (in some overload operators parameters we must use const char* instead char*... i need unders...
[15 replies] Last: cubbi: if i do these: variant vrValue ={100.456f,"hello world", 20.45... (by Cambalinho)
Is there a way to pass a variable from a constructor of a derived class to the constructor of the base class?
 
I'm looking for a way to pass the variable 'pos' to the constructor of the class 'Entity' from its derived class 'Paddle'. I know that in this case I can simply...
[2 replies] Last: Thanks keskiverto, I guess that solves it. I hoped that there would be... (by Dvir Arazi)
RE-Creating Quick Sort algorithm for class
 
I need to create a quick sort method for my class and i am having trouble finding an example with a single input parameter. The input for my method will have to...
[15 replies] Last: @digitalarts - what a waste. Your OWN code in an earlier post wasn't a... (by lastchance)
How To Use -> in C++?
 
Hello Professionals, I would like to ask if you can explain in an easy way how to use this -> in C++? Thanks.
[5 replies] Last: Thanks for the insights pals. God bless. :) (by kindgnice)
Garbage values in my methods?
 
Hello everybody, just for a little background I have almost no experience in Object Oriented Design, so this may seem like a simple error but I've fuddled aroun...
[1 reply] : We need to see the whole program. Anything could be happening. (by tpb)
Inheritance or Templates for Embedded application
 
Inheritance requires extra memory for virtual table. Templates can generate more code. When designing embedded application what approach should I select, or how...
[7 replies] Last: That makes sense thank you for your help. (by afedorov)
implementing a recursive data structure
 
hey, I need to implement the following data structure in c++ https://pastebin.com/M9yKhfGR (Java code) I will point out what I'm finding hard to do in ...
[no replies]
Root Finding
 
I need help with this program. No idea where to start or set up. When a car hits a pot-hole, the springs and shocks get a workout dampening out the sudden jol...
[7 replies] Last: I should think from the description that the original equation is m d... (by lastchance)
March 2018 Pages: 123... 15
  Archived months: [feb2018] [apr2018]

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