General C++ Programming - September 2011 (Page 6)

Input
 
Suppose the following: data.txt: Ain el Beida # - # OEB # Algeria # Africa # F # 42578 # 61997 # 90560 # # Ain Oussera # - # EDJ # Algeria # Africa # F # ...
[1 reply] : bump... anyone? (by azuk040891)
destructor doesnt return control to calling function
 
I am having some weird errors while trying to de-allocate memory. I have two class inspector and hypergraph . Both are singleton objects. I am trying to deal...
[2 replies] Last: Well, the actually code is in MPI. Using gdb with MPI is a pain. Hence... (by maheshravishankar)
Executing C++ Code
 
Is there a way to do this? I want to execute c++ code like php eval function. User will enter a c++ code and my exe will exec it. Is it possible?
[1 reply] : It's possible, but not very easy to pull off. You'd have to have a lot... (by Kyon)
Else statement failing to execute in a four loop
 
I'm not sure where my error is coming from because it complies with no errors. The idea behind this code is that i have a set of functions that fill arrays and ...
[7 replies] Last: I fixed most of what people commented on... #include <stdio.h> #incl... (by forceface)
Isolating words in a string
 
I'm trying to write a translator program but I'm having trouble isolating words in a string. Here's basically how I've been doing it: #include <iostream> #inc...
[2 replies] Last: Ah, thank you, this should do the trick. (by NetHacker)
by Srija
Password hiding
 
hi i hav a code snippet for hiding the password as #include<iostream> #include<conio.h> using namespace std; int main() { int j; char c ; cout <...
[3 replies] Last: No, still incorrect. That shouldn't even compile due to type mismatch... (by webJose)
by Bill90
Returning a template typedef
 
Hello, I'd like to know what's wrong with the following piece of code: template <class Type> class Locator { private: Type b; public: t...
[3 replies] Last: That's not a problem with C++ though :O (by hanst99)
by zile
Default Push Button for tab(child window)
 
I have this dialogbox with a default push button already which works, below this button i have a tab control, after i make a tab and set one of the buttons IN t...
[no replies]
Vectors of vectors (2D vector)
 
I have a few questions. 1) Is it possible to have a prototype for a function that returns a vector of strings? If so, how would you write the return type? ...
[12 replies] Last: 1) Certainly. vector<string> func(); Not very efficient. A copy ... (by hanst99)
by Shaaw
Opening an exe-file.
 
I need some help opening an exe file from a game. It is possible but I havent been able to open in so the code is visable. Can I send the file to someone wh...
[3 replies] Last: Here are some good resources on the topic: http://de.reddit.com/r/Reve... (by Computergeek01)
Beginner Programmer
 
Hi, I am a starting out 12 year old C++ programmer and I had come into a problem. Basically, It asks the user for input on what the computer will do. Instead ...
[7 replies] Last: So as you can see, i didn't give you the exact code to protect my cod... (by hanst99)
by Srija
simple doubt on Getline function
 
hi I have declared a character array with 10 as size. while i am getting input to this array, if i am giving more than 10 characters it is taking for that ch...
[2 replies] Last: thank you it's right.........and is helpful. (by Srija)
unicode
 
hello guys . i use getasynckeystate function to understand what the key pressed but in the unicode i dont know what i do !! i think i have two way , one convert...
[6 replies] Last: tnx for help but i want capture unicode not multi byte character set (by ahura24)
Little Problem with Logic using Strcmp()
 
Hi everyone, I am trying to use 'if' statements involving strcmp() and tests inside a while loop involving strcmp(), but my program blows up in the middle of i...
[5 replies] Last: thanks for the help (by coolbran)
by beau
Converting String to Binary
 
I'm attempting to read in a file and convert it into its binary representation. The program returns the correct representation for all of the characters that ha...
[1 reply] : to be honest I didn't read all of your code but the following function... (by closed account zwA4jE8b)
how to i copy to clipboard so i can use it as ctrl v
 
sorry if i dont make sense. im still confused on how to explain what i want. so basically, if they enter in a text in a console, it would be saved to their c...
[2 replies] Last: OK. I understood. You want to write to the clipboard. #include<w... (by tolga gerekci)
String problem with c++ game
 
Hi guys! I am having a little problem with my latest game in c++ i know how to give an error if the user types in a wrong number, but i dont know how to make...
[9 replies] Last: after reading a bit more on exceptions myself your exception block it ... (by Azagaros)
Dynamic Allocation for Instance Variable
 
Can I do this? I have a class Image. In this class, I have a instance variable of pointer float *h. But I do not initialize this pointer in constructor. I init...
[1 reply] : Yes that is perfectly acceptable. Although if you want proper encapsu... (by Disch)
by broot
recursive traversals
 
Hi everyone, I'd like to use a recursive traversal to output a binary search tree with a space between each value - but no space at the end, which is the part I...
[1 reply] : void BSTree::recursive_inorder(BSNode *subroot) { if (sub_root ... (by Azagaros)
pointer as parameter
 
Hi all. I have a small problem concerning loosing the information of the pointer adress by going back from a subfunction to the main function. I define a stru...
[3 replies] Last: Thanks a lot! This was definitely something I had not yet a lot of exp... (by MCJamaica)
September 2011 Pages: 1... 45678... 31
  Archived months: [aug2011] [oct2011]

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