General C++ Programming - March 2011 (Page 7)

by dAND3h
help pls - complexity
 
Hi, I am writing a Double linked list structure, and I have implemented a function called Insert which takes 2 params: The object and an int position. It shoul...
[no replies]
lists
 
hi i am working on a game and almost all things are coded in python,but i need to make some classes in c++,i have a problem with lists, in python i can insert i...
[2 replies] Last: thanks, (by cistadiplomatija)
C++ Console application using classes
 
Hi I am new at this and wrote this code but for some reason it does not come up with the correct answers need help please! Here is my code: #include <iostre...
[8 replies] Last: This is how I have done it now: double COTP::m_pay = 0; double CO... (by mstratmann)
Declaring A Subclass, Subtyping
 
Hello, thanks for any help ahead of time, I have a player class and I am trying to subtype it with a Simple player. I can't use any other approach, and can onl...
[4 replies] Last: Awesome, thank you, this answered all my questions, and yes, bet is a ... (by pcannons)
Memory Leak Issues?
 
I'm not expecting anyone to spend a lot of time, but I am running my program through something that detects memory leaks and am getting back that I am leaking a...
[1 reply] : A simple search shows your program uses the new keyword twice, but i... (by filipe)
Sorting Multi Levels
 
Are there any references for the algorithm to sort on more that 1 level. I have a file with Date Sector Store and I want to sort it Date and within Date b...
[8 replies] Last: Got it. Thanks! (by asavage)
by sever
A GDB simple question...
 
Hi, A very simple question... I think... Is there a way to guess the line/lines among my source files are involved in an error when the program breaks wit...
[1 reply] : I just see that the *number* corresponds to the program id... (by sever)
by bbgst
OpenGL error 1282
 
Hi. I'm really desperate. I used OpenGL with C++ for months. Then I formatted my computer and, for some reason, I couldn't load textures anymore. I spread gl...
[3 replies] Last: We have no idea about how the underlying implementation of the OpenGL ... (by closed account S6k9GNh0)
by lrhnfs
My Puzzle: inline static class::method with static variable
 
example: // singleton_object.h class SingletonObject { public: inline static SingletonObject& GetInstance() { static SingletonObject...
[6 replies] Last: Thank you, coder777 I think you are right, I know how to solve the ... (by lrhnfs)
by Vaaal
problem with CONST and function member overloading operator
 
Hi guys, I have a problem about const and member function overloading operator. Well, if I do something like int c; /c is global const int &try (int a, int b)...
[7 replies] Last: ok, now it's all clear. Thank you very much :-) (by Vaaal)
How can I speed up this very simple loop?
 
I've never really paid much attention to low-level optimization before, but now I have a program that spends 90% of its time in this loop, running it many billi...
[6 replies] Last: I thought about calling the loop with pointers to the and indexes... (by budman85)
How I can check if a variable is initialized?
 
Hello, I have a question, If I have a variable, such as a pointer, but I don't know if it is initialized. Is there any method to check this? For example, it ...
[2 replies] Last: You should initialize it when you use it the first time. just like: ... (by lrhnfs)
FindFirstFile Not working properly
 
Hi Guys I am trying to read contents of directory... using "FindNextFile(hFind, &FindFileData)" Findfirstfile returned me then first file in the directory....
[8 replies] Last: Guys problem solved.... It needs some settings to be changed in the pr... (by Prakasha)
by iNgine
Help me with my C++ code pls. (1,2)
 
a program that will read a number, n, and then output the sum of the squares of the numbers from 1 to n, So if the input is 3, the output should be 14, because:...
[22 replies] Last: So to make th program do what you want it to, you have to change this ... (by anonymous23323124)
OpenGL / DirectX GUI Overlay
 
If you've ever used Steam or Xfire, both of these have an in game overlay menu. How does one go about this in concept?
[2 replies] Last: I know that :/ I mean, the concept of the overlay, interacting with D... (by closed account S6k9GNh0)
Variable In SQL String
 
I am trying to insert a variable in a SQL string but am not having any success in finding the proper sytax. I am coding in C++. Listed below is code section I a...
[3 replies] Last: If you really want to enjoy C++. instead of using C. The job could be ... (by b2ee)
by offy86
read a file and write it in array
 
I've a file ashii with a sequence of 65536 zeros and ones (that should represent a binary image). I have to put it in a int array so i will be able to analyse...
[3 replies] Last: ya sure. here's a simple example of how to read a file char by char, ... (by ultifinitus)
How to print values lower than a certain number?
 
I'm trying to print values lower than a set number but I can't seem to get it to happen. My Program just hangs. They don't have to be sorted by price, I just...
[4 replies] Last: Okay, there seems to be a problem with my infile state ment. When I co... (by skatingrocker17)
just a little problem (1,2)
 
Hello boys, I am trying to make a program that inputs a positive integer n, and a text file, and outputs in reverse order the characters placed on the n-th lin...
[28 replies] Last: @Jennifer. I suggest you look at the substring function of std::string... (by anonymous23323124)
How compiling and running a program differs from the programming
 
I wrote a program yesterday that eventually runs quadrillions of calculations. In an attempt to make it as fast as possible (even by thousandths) I rewrote the...
[11 replies] Last: Names of functions, variables, and such so that when you debug the pro... (by Zhuge)
March 2011 Pages: 1... 56789... 31
  Archived months: [feb2011] [apr2011]

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