General C++ Programming - October 2014 (Page 30)

Passing in Multiple Text files
 
I have been working on code for quite some time and am able to successfully read in a text document and take certain words and information that I need. The issu...
[8 replies] Last: #include <iostream> #include <fstream> #include <string> #include <ma... (by JLBorges)
c++11 - adding new options to my String class
 
i'm give the replace option to my string: void replace(string oldstring, string newstring) { int stroldstringpos=b.find(oldstring); b.r...
[3 replies] Last: void replace(string oldstring, string newstring) { int st... (by Cambalinho)
How to make sure dereference to vector is valid
 
I have this piece of code in parts of my path finding algorithm for( int head; head < q.size(); ++ head ){ walk& w = q ; // do manything...
[8 replies] Last: However I notice that sometimes w is cannot be dereferenced I am ... (by MiiNiPaa)
by judo11
How do I trap character inputs in C++?
 
This is just a portion of my program. My problem is that my program doesn't trap or block character inputs. I declare char opt='0' to go to main menu. If the us...
[no replies]
problem while running
 
this is a program that display prime numbers from 1 to 100. it has problem linking when i run the program, someone please help. thx #include <iostream> class ...
[3 replies] Last: 1) true is a reserved word. It should not even compile. 2) Your loos ... (by MiiNiPaa)
by Shyckh
vs 2010 express problem in building a project
 
i have a project which is made in vs 2010. i have vs 2010 express. when i tried to open solution file of the project it give me an error that "not a valid p...
[6 replies] Last: thanks i will try to get the torrent of 2010 professional (by Shyckh)
by AceK
I need help with libusb, if anyone is familiar with it
 
Hi guys, I want to perform a simple task using libusb. I have written code that will attempt to open a usb device which is my Cell Phone in this case and then t...
[no replies]
[HELP] Error debugging with functions
 
Hi guys, I need your help again.. I am remaking this code for my gain, and it seems that I cant debug the error.. Are there any comments on the structure of t...
[6 replies] Last: Thanks JLBorges. :) You never cease to amaze me. :P (by jemeripol)
Mysterious gray background color MDI
 
Hello Cplusplus, I'm writing a program and I have a problem I hope you guys could help me with. Like you can see in my code downbelow, I have the WinMain ...
[no replies]
by Ritik
How to print out elements of vector of type pair?
 
here is a piece of my code: while(T--) { std::vector<std::pair<int, int> > *dragon; std::vector<std::pair<int, int> > *villager; ...
[2 replies] Last: Okay! No reason in particular as to why I was dynamically allocating m... (by Ritik)
Explain this code behaviour
 
Please read the comment. #include <iostream> int M(int i) { printf("%d\n",i++); } int main () { int i=10; printf("%d\n",M(i)); /* I think ...
[10 replies] Last: SAdly there are little of them. And it does terrible job of determine ... (by MiiNiPaa)
How to compare templated class with variadics?
 
I've this variadic template class implementation: // Predefine template delegate factory template < typename R, typename... Args > class brGenericDeleg...
[4 replies] Last: Thanks for the hit to the back of my head ;) I was too fixed to compar... (by hellhound)
Validating Characters in a Stack
 
I am seeking some help on validation opening/closing brackets. I had the entire validation working until my professor said that my Pop function had to be a "vo...
[7 replies] Last: Finally got it to work!! @Cire Thanks for the advice, made me think s... (by Shuruki)
General c++ question
 
Out of your guys's experience . How much knowledge of c++ would you think it would take to manage a simple 2d game. I've been studying c++ for years. i can use ...
[1 reply] : Lazy Foo SDL2 tutorials. Pretty solid game making tutorial. (by poteto)
Copy Constructor with an Array Crashing!!!
 
I know everything works except my copy constructor! There are no errors. The program crashes when it goes to access the copy constructor. Anybody have an clue a...
[2 replies] Last: You don't allocate any memory in your copy constructor, as you do in y... (by cire)
[solved]Process Handle in Windows
 
Hi all Is there any difference b/w process handle and pid. if so how i can get HANDLE of all processes. Thanks
[4 replies] Last: Yes. Call WaitForSingleObject on the process handle. http://msdn.micro... (by modoran)
by drk97
string modification
 
hi everyone! i have to write a function to modify the input string by substituting each alphabetical character. for example, 'Programming' to 'Rtqitcookpi' (m...
[1 reply] : I was at first confused by your using 'mod' -- which is a mathematical... (by Duthomhas)
Trying to Design a Simple Calculator
 
For this specific assignment I have to use functions to make a calculator. I have to make a separate function for adding, subtracting, multiplying, and dividing...
[1 reply] : First, you seem to have the right approach to the assignment, all the ... (by Shuruki)
Why does my code ask for "Please enter a number between 2-12: " twice?
 
Here is the whole code if it helps. #include <iostream> #include <ctime> #include <cstdlib> //This program prompts the user to select a number between 2 and ...
[6 replies] Last: @thehunter629 Sorry for my error, but I based my response on just the... (by whitenite1)
c++ program for determining maximum deflection on a beam
 
I am new at c++ and I am trying to write a code to determine the maximum deflection at the end of a cantilevered beam. I am given the formula : deflection= (4 ...
[2 replies] Last: +1 for the comment above.. then use return 0; not return y; and m... (by jemeripol)
October 2014 Pages: 1... 2829303132... 38
  Archived months: [sep2014] [nov2014]

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