General C++ Programming - February 2009 (Page 5)

My "Fully Buffered" fstream wrapper class -- Comments Please
 
Hi all, Here is my wrapper class for ofstream. I would greatly appreciate any comments and suggestions. Even more importantly, if I've just reinvented the wh...
[no replies]
HOW TO:write cirillic to a file
 
hi, does somebody knows how to write cirillic symbols to a file. i use array of type wchar_t to keep cirillic symbols. i write this array to a file, but w...
[1 reply] : You should specify the encoding eg: fstream f("file.txt"); f... (by Bazzy)
custom library (if any)
 
Can a user defined his own library. Also, is there a function for the divisor function of an integer?
[3 replies] Last: No, not predefined. You have to write it yourself. (by jsmith)
by olove5
I can not figure out thos errors 11:50 PM
 
In function âstd::string infixToPostfix(const std::string&)â: error: âprecedenceâ was not declared in this scope HERE IS THE CODE class ConvInfPost ...
[3 replies] Last: Is the bolded line of code inside one of ConvInfPost's member function... (by jsmith)
by cidron
simple arraycopy
 
EDITED: new problem Hi kind people. Why does this not work? :( #include <iostream> using namespace std; int main(){ char A,B; char arr1 ...
[7 replies] Last: Doing char arr1 = { A, B }; doesn't make sense since A and B are bo... (by jsmith)
write unicode to a file
 
hi everybody, i have some problem with writing an array of type wchar_t to a file. here is my code ... wchar_t name = "акмал"; FILE * pFile; p...
[2 replies] Last: A couple of observations. wchar_t name = "акмал"; should b... (by kbw)
fitting a string in an array of pointer to characters
 
Below program tokenizes string in s1 and stores each token in array of pointers array . The statement: array = new char; allocates 4 bytes to pointer in...
[6 replies] Last: No. It's not strange at all. Not all buffer overflows instantly crash ... (by helios)
by cidron
simple arrayproblem
 
Hello people, im new on this forum, and also new to programming. I have a problem i have spent some hours trying to figure out, but i cant seem to get it. I...
[11 replies] Last: The code both n4nature and I posted does exactly what you described. (by helios)
double const in a definition
 
Hello, if function is defined similar to this: const_reference operator ( size_type n ) const;, Why is const often used on both sides of function "header"?
[2 replies] Last: thanks. (by KarlisRepsons)
Conversion from C to VBA
 
I am attempting to convert the following C code (being run on Solaris) to VBA for use in Excel for the purposes of client presentation: theta = r / (q * q * ...
[9 replies] Last: You're right - there is an extra ) after theta in the original C code ... (by phudgens)
optimizing a function to print words (in a sentence) in reverse order
 
Hi, The program below tokenizes the string represented by s1 and copies each word in an array of pointers to char and prints each word in reverse order. It w...
[4 replies] Last: Thanks for this answer! (by n4nature)
Trouble with Class Files
 
Currently I am creating a program that uses my own defined class to compute a polynomial function based on user input in the application file (which is yet to b...
[1 reply] : One cannot compile code with a linker. In your case, when you compi... (by jsmith)
by raneif
repetition
 
I am the beginner of this program.. question: write a c++ program that displays a table of 20 temperature conversion from fahrenheit to celcius. the table s...
[2 replies] Last: You can use another variable in the for loop (say j) that counts from ... (by n4nature)
by akp
How to run WinSCP.exe from my application
 
Hi All, I am doing an application which will call another exe (WinSCP.exe) to execute. If I use WinExec("C:\Program Files\WinSCP\WinSCP",SW_SHOW) it doesnt ...
[1 reply] : Remember that \ is used for escape characters so change the path to "... (by Bazzy)
Making a sudoku 4x4 combinations lister
 
I am trying to make a c++ program to list all possible combinations for a 4x4 sudoku solver. This is how a 4x4 sudoku works, You have 16 numbers that make a...
[6 replies] Last: I just noticed I had misread your original post; one must also check t... (by tition)
USB Webcam Line Detection
 
I am working on a robot that stays in between two white lines that are ten feet apart and three inches wide. I am using web cams angled at 45 degrees on the x...
[1 reply] : There is a guy, Chesnokov Yuriy, on The Code Project that has don... (by closed account z05DSL3A)
++ and -- operator tricks on char*
 
Could someone explain in more details what are those operators doing, when I do: char C = "ABCDE"; char* c = C; cout << "c = " << c << "; \n"; ...
[6 replies] Last: Thank you all! (by KarlisRepsons)
Generic programing/ no vector but array
 
i made this code for an excercise but its not goed yet because i must not use vector yet just array or make extra variable. i need help to make this correct...
[no replies]
by koliva
File Size of Saved Bitmaps
 
Hello everyone, In my raytracing code, I can save images taken from another viewpoint. I used Bitmap.Save method to save them. Everything is good and I can ...
[4 replies] Last: I get 2.572.870 bytes as a result. Very close to the 2,572,816. I th... (by koliva)
by vijkrr
finding all the functions and total number of lines in that function.
 
Hi, I want a C++ program which will take a input as another C++ program and have to findout all the methods in that program and have to count the no. of lines ...
[no replies]
February 2009 Pages: 1... 34567... 14
  Archived months: [jan2009] [mar2009]

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