General C++ Programming - June 2015 (Page 13)

Need urgent help on RPN
 
i am doing algorithm to evaluate postfix expression class Stack{ public: Stack(); Stack(const Stack &tokken); private: stack <char> mystack; char c; int ...
[1 reply] : ... (by ne555)
C++ STD.
 
I am using C++. I think maybe I might be interested in buying a book on the C++ Standard library. I couldn't find anything recent just : The C++ Standard Libr...
[6 replies] Last: Nothing's ever safe from jokes. "std" (minuscules) == shorthand for "... (by Duthomhas)
2d char array as return value
 
I declare and fill a 2d char array in array.cpp and want to pass it to the rest of my program. From what I've read so far there are various ways to do that but ...
[1 reply] : Don't use C-style plain arrays in this case, they will cause you a lot... (by LB)
Random guessing game error
 
Can please someone tell me why when i run this code ive get this error: Invalid operands to binary expression ('ostream'(aka'basic_ostream'<char>') and 'cons...
[3 replies] Last: Thank you I didnt notice this. (by BadAssPanda)
Finding the bug
 
Hello, im currently learning c++ and one of the exercises I was given is to find the bug in the following code. I could not figure out what the bug was, other t...
[1 reply] : http://stackoverflow.com/questions/752658/is-the-practice-of-returning... (by mutexe)
Alias to method
 
I have a class which defines such function: std::string operator()() const; How to make a function with another name, which would work like this one? I'd lik...
[4 replies] Last: Maybe it's true, that I'm a little bit insane on optimizing. Thanks P... (by TheHardew)
by AcarX
Reading memory of an application
 
Hi guys, So i'm working on a simple bot atm using c++ and with ReadProcessMemory() i can read memory of the target application. But since memory address for ...
[1 reply] : I believe you can find the relative distance from the starting point o... (by Ispil)
container of shared_ptr to base class and protected pure virtual method
 
I have been working on a little project for a while now and it was going pretty good until I ran into a little bit of a problem. Consider this code: #include ...
[5 replies] Last: I want to be able to call the overriden method "print()" on every ele... (by Gamer2015)
by rosa
Solving two nonlinear equations with two unknowns in C++
 
I have two nonlinear equations with two unknowns, i.e., tau and p. both equations are: p=1-(1-tau).^(n-1) and tau = 2*(1-2*p) ./ ( (1-2*p)*(W+1)+(p*W).*(1-(2*p...
[1 reply] : Hiya, If you've done it in matlab i'm assuming you're familiar with th... (by mutexe)
by sp25
Shared Memory Security
 
Hello, I am implementing IPC between 2 windows processes using shared memory (memory mapped file). The main reason for selection of this is to have the fastest...
[5 replies] Last: I get the feeling that OP wants to protect the shared memory from bein... (by helios)
need help my file won't open
 
what am i doing wrong? #include <iostream> #include <fstream> using namespace std; double calcAverage (int first, int second, int third); int findHighe...
[1 reply] : Do you have a file named "filename.c_str()"? (by Peter87)
by arvust
Quick Sort
 
Hi, I'm currently trying to convert a sorting algorithm from using two ints and an array to only using two pointers. below is currently what I am using bu...
[2 replies] Last: Smac89: The code follows the convention of first == the first element ... (by helios)
invalid conversion from int* to int
 
its getting invalid conversion from int* to int in this section int s=&data ; please help. #include <iostream> using namespace std; const int size=5; int da...
[1 reply] : int s=&data ; You're dereferencing, then referencing again, resulti... (by Albatross)
Class method in a vector call
 
I keep getting some errors on this code #pragma once #include"Include.h" //Here I have #include<vector>, using namespace std, //#incl...
[2 replies] Last: Thank you for the help but I solved including "schClass.h" in "school.... (by chtorr113)
by AcarX
Getting rid of empty indices in a vector
 
Hi guys, So i'm working on a client/server application and in server i have this: std::vector<Client*> *clients; and i'm using client->push_back(*clientA) to...
[5 replies] Last: Erase–remove idiom: https://en.wikipedia.org/wiki/Erase-remove_idiom... (by JLBorges)
Recursion help
 
Am I doing this right? I am trying to practice recursion and what I did here was re-write an iterative function into a recursive one. #include <iostream> u...
[8 replies] Last: Cire, I think you'll find it's spelt "evangelise". :) (by mutexe)
Can Anyone help?
 
Hello, I am currently taking a computer science class, I have run into something i just can't figure out. This is what is asked of me in this assessment"For th...
[7 replies] Last: Thank you to all. i have tried to put this together, i don't know. any... (by Blats70)
scripting language
 
is there any good book/ online tutorial, how to built a scripting language?
[3 replies] Last: This article looks interesting in that it dispenses with LEX/FLEX and ... (by andywestken)
Input test
 
Hello everyone, I'm very new to programming and taking an intro course for fun. I have a project due tonight that I wanted to spice up a bit if I can. Here is ...
[3 replies] Last: Dupe post!!! Here... And there... Input test http://www.cplusplus.c... (by andywestken)
does execlp need a path?
 
if(pid==0){ execlp(cmd.c_str(), (char*)cmd.c_str(),0);//I entered just ls and it lists the files _exit(EXIT_SUCCESS); ...
[6 replies] Last: @ MikeyBoy Let's not abuse the young padawans for their failure to be... (by Duthomhas)
June 2015 Pages: 1... 111213141516
  Archived months: [may2015] [jul2015]

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