General C++ Programming - May 2011 (Page 9)

by Disch
Game programming structure tips (PM log) (1,2)
 
So I received some PMs with questions about how to improve some code. I usually tell people to post on the boards, but in this case I just replied to the PM. ...
[22 replies] Last: Ha-ha, thanks for pointing out this. HGE pointer is released just befo... (by Moarthenfeeling)
by AGNuke
Requested Evaluation by Experts
 
Hi all! I, as a beginner tried to compile a program which calculates the Geometric Progression as per the given parameters. Now the deal is I got it far ...
[4 replies] Last: "n" is a natural number, obviously minimum is one... btw, have a look... (by AGNuke)
Bjarne Stroustrup
 
I've been reading a lot of forums discussing which books one recommends to learn C++, and have yet to see Bjarne's book Programming in any of the lists. Any t...
[3 replies] Last: Programming -- Principles and Practice Using C++ http://www.strous... (by closed account z05DSL3A)
Return'ing char*
 
This was always a bit tricky for me... Mostly I want to return dynamically sized c strings. Just initializing char* as a normal c string hast no guarantee for ...
[4 replies] Last: Now I've read yesterday that using const as the return value of the f... (by kbw)
Random Generator
 
I looking to write a random generator that will generate a string of char (upper, lower, numeric, symbols) up to 100 characters long. It seems that rand can...
[6 replies] Last: That looks ok. One tweak you'll need: int m = 100; // the size of th... (by kbw)
Problem in C++
 
I am using devc++. In this i want to compile the code but i can't find the compile or run button please tell me immidately i am waiting.
[1 reply] : Use Code::Blocks instead. And make sure that you have the mingw compil... (by coder777)
by mgm11
serial programing- portb wrap around
 
Hi guys, i'm doing my first serial programing at uni, and i'm stuck on an error check. This is my error check i have been given; ERROR CHECK 4: DYNAMIC PERO...
[1 reply] : your code only deals with pipe. That's where the error occurs? But ye... (by coder777)
Bounding circle
 
I am working on a project to draw a circle around points and must connect to the furthest point from the center. I have everything to work but I can't seem to g...
[3 replies] Last: see on right side or writing area. select the code and press, < >. (by writetonsharma)
c++ Unused variable
 
Hi, I am working in large code base in c++(may be 8 million code). In My application I have seen thousands of unused variable and reported by g++ compiler bu...
[6 replies] Last: @Arthar, that depends on the optimization of the compiler. do you mea... (by writetonsharma)
Filestream and array
 
I am Trying to get a file that has codon/amino data uuu phe uua phe ^^ in that form. I am trying to put the file into an array so each element reads in a...
[3 replies] Last: I suggest you read each line using a \n and than write a function whi... (by writetonsharma)
by LB34
problem with passing reference of vector as function parameter
 
Hi, I'm a newbie in C++. I'm facing weird behavior when pass a vector as reference to my function. Here's the code snippet: void TransposeMatrix ( vector<int>...
[no replies]
if statement condition
 
Hi There, This is a loop I am using, which is part of a bigger code. The if statements in the loop are used to separate points on the screen into respective ...
[3 replies] Last: Thank you very much Disch and Mathhead200..this worked...greatly appre... (by sanehatter)
reading files specified by user
 
hi, im making a program where the user will enter a file number and it will open the file and take the number stored in the file and add 1 to it, when openin...
[no replies]
by azaaza
construct a suffix tree for a string
 
Anyone knows how to build up a suffix tree for a given string in C++? any inputs will be appreciated. Thanks.
[1 reply] : Have you googled? http://marknelson.us/1996/08/01/suffix-trees/ It h... (by hamsterman)
Failing To Remove Last Vector Element
 
#include <iostream> #include <vector> using std::vector; using std::cin; using std::cout; using std::endl; vector < int * > Vec; void Init( cons...
[6 replies] Last: Well, you learn something new everyday. Thanks, Disch, and Athar. (by closed account zb0S216C)
by thipla
particular access to class members
 
Hello everyone, I have a question for you. Imagine I have the following class class My_Class { // declaration of public members public : in...
[2 replies] Last: C++ does not allow this. The closest you could get would be something... (by Disch)
Basic Dictionary Class!
 
Introduction: Hello, this my first post on this forum. So here is my introduction. I have been programming for two years in .NET (Basic/C#), one year in Java...
[10 replies] Last: Thanks @Veltas, like I said I wanted to accomplish three things in thi... (by closed account GzwXoG1T)
What are you using to write your code?
 
What are you using to write your code? Just thought it'd be cool to get an idea of what the members here are using for editors/IDEs. Have fun! As requeste...
[17 replies] Last: I'm still relatively new to C++ but I've tried Code::Blocks and VS and... (by Veltas)
by JCS
Specialization of a function
 
Hi, I am writing some scientific code. I have created a function "quadrature" which integrates over a triangle a given function provided in argument through ...
[9 replies] Last: @Athar Heh, I feel stupid now... Of course that doesn't work :/ I'm no... (by anonymous23323124)
How can i create my mouse click event in std-c++
 
I tried this: #include <iostream> using namespace std; int main(){ asm("mov ax,0x03" "int 0x33" "test bl,1" "jnz Left_pressed_button" "test bl,2"...
[9 replies] Last: It won't be cross platform because what you are doing is telling the O... (by Computergeek01)
May 2011 Pages: 1... 7891011... 32
  Archived months: [apr2011] [jun2011]

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