General C++ Programming - December 2011 (Page 3)

by naruto
how to write a file bit by bit ..?
 
i have found someone using current_bit to do some bit operations.. how can file be written bit by bit is this is the only way..
[2 replies] Last: I wouldn't try to write a program bit-to-bit and noone would in my opi... (by eypros)
Problem getting mouse Co-ordinates.
 
I am having trouble with this. I am using GLUT. Trying to get mouse co-ordinates for the whole day and unsuccesfull after all that work. Help please. what i wan...
[1 reply] : bump! (by biplav17)
add some change in this code - input from a file and output to another file
 
hi i have this code(gtalk pw decoder): #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <wincrypt.h> #define SEED_CONSTANT 0xba0...
[10 replies] Last: yohoooooooooo!! i did it! thanks guys! (by jacob73)
Problem with "Segmentation fault (core dumped)"
 
Hello I have a little problem with my program, I have a problem with "Segmentation fault (core dumped)", My algorithm search a way in labyrinth, but i have p...
[2 replies] Last: Thanks for help ;) I find a bug, i use other method to do this algorit... (by Piotr Kruk)
Closing Console Without Error
 
hi i'm very very beginner so i have to write a program with arrays.program works just fine but when it's time to close console it says that "Run-Time Check Fail...
[2 replies] Last: hey thanks mate i got it thank you ;) (by Dreamscape)
Non-pointer variables!!!
 
Hello!!! I want to allocate memory dynamically to non-pointer variables(char,int) and later deallocate memory from non-pointer variables in c++...How can i do ...
[7 replies] Last: When you use new , you are not using it to allocate memory for the... (by Moschops)
by dalawh
Dynamic Memory (1,2)
 
I was reading http://www.cplusplus.com/doc/tutorial/dynamic/ and trying to under stand dynamic memory, so I wrote a small program to try to understand it. #...
[31 replies] Last: @Cubbi: I was wrong. Sorry for the confusion and I take back all my i... (by h9uest)
use of predefined macros.
 
Could anybody please let me know how do I use predefined macros in the code? I am trying the same thing mentioned in the tutorial #include<iostream> usi...
[2 replies] Last: oops..you are right ! thanks a lot. It now works :) (by incognito)
by Aashu
Write a C++ Program That Show Distinct Number?
 
Write a C++ Program That Show Distinct Number Means I Take 10 number from user and it eliminate repeated number and show non-repeated number only!
[5 replies] Last: $ cat - | sort | uniq (by ne555)
Converting an entire text file to a string
 
Been looking on the internet and have been unable to locate anything to help me with this (that is clear cut to the point where I can understand it at least). ...
[3 replies] Last: By chance, I spotted this function in a Boost sample shortly after I o... (by andywestken)
by tcpbox
Method header that I don't know it.
 
Hi guys, I am new here. I saw a thing in c++ that I never saw in before, so if someone know this please explain to me what it is. This is the teste.h cla...
[2 replies] Last: Thank you Galik for your prompt answer. I understood now, so simple. ... (by tcpbox)
by Pyrius
How do compilers write to .exe files, and what do they write to them?
 
I want to program a simple assembly language compiler for the experience, but I don't know what compilers write to the .exe files they create. I'm pretty sure i...
[10 replies] Last: Just to add on, back in the old days, the way to make your scores what... (by sohguanh)
by pot
std::stringstream can be used as bytestream?
 
It's very cold. Anyway, I'm making a program to scan bytecode. I want to make it can scan both std::istream and std::vector<char>. So, when it gets vecto...
[6 replies] Last: Can we make this EOF behavoir as sticky? File IO is an often done oper... (by sohguanh)
trouble with pointers to fstreams
 
I'm still trying to figure out C++ file I/O. Is it possible to dereference a pointer to an fstream and pass the results to a function? I'm trying this: fstr...
[12 replies] Last: I love screwing myself into the ground for hours over dumb mistakes. ... (by sohguanh)
Explicit type conversion
 
Converting from user defined variable to basic type: (All the below things are written wrt Robert Lafore's Book on C++) If I have a user defined variable(say ...
[3 replies] Last: In the definition of conversion operator operator float()const { //... (by pratik singh)
Pokemon game help is appreciated
 
I am working on a pokemon game and need a little insight to a dilemma i am having. class pokemon { public: void Generate_IV() //this function will generat...
[3 replies] Last: You don't necessarily need to make a function called random. Just use... (by Telion)
by dalawh
Constructors
 
When you have a class with one constructor with parameters such as: class CRectangle { int width, height; public: CRectangle (int,int); in...
[3 replies] Last: Thanks for confirming this and explaining this. (by dalawh)
by young7
Trying to create a C++ DLL that I can call from Visual Basic
 
I’m trying to create a C++ DLL that I can call from Visual Basic. I need to use inline ASM and C++ seems to be the best option for what I want to do. I ha...
[8 replies] Last: Modoran, My ASM routine will store a long string in memory. I’d li... (by young7)
Colours
 
Does anyone know a good website that tells us all the codes for colour. I know it is colour(red, green, blue) but i need the exact codes. I am using opengl. ...
[2 replies] Last: thanks (by biplav17)
array as an argument to a function
 
I am trying to pass an array as an argument to a function, and it does not seem to be working. Any ideas? This is my function... int explode(string src, char...
[10 replies] Last: My Hero! I knew it had to be something simple. Thanks a bunch :D (by rscarson)
December 2011 Pages: 12345... 39
  Archived months: [nov2011] [jan2012]

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