General C++ Programming - May 2009 (Page 2)

Buffer Character Comparision Issue
 
Hi basically the code gets the status of a gtk checkbox (unimportant) then writes "active" or "not active" to a char buffer, i then want to compare this buffer ...
[1 reply] : You have to use a function from the c run time library. You cannot us... (by kempofighter)
Strange behavior of floats in C++
 
I'm getting some very strange behavior in an algorithm that I am creating. I have a test algorithm in C++ that is supposed to produce a particular result. A...
[7 replies] Last: Thanks! I forgot that. (by freehand)
instantiated from here error
 
I'm getting this "instantiated from here" error and I'm clueless on why I'm getting it. First of all, I define a class cPoint, with members floats: x, y, z, ...
[2 replies] Last: Genius! I knew it had be something simple like that. I had no idea d... (by troyjp80)
by helios
Unicode strings
 
Okay, so I need to use some of them and I wanted some advice. Which of these is best? 1. std::wstring. 2. std::basic_string<uint16_t,std::char_traits<uint16_t...
[10 replies] Last: It's worth noting that Unicode is a subset of the Universal Character ... (by helios)
Intelligent System
 
I'm very new user here. I searched about Intelligent System in this forum although I found only the thread http://www.cplusplus.com/forum/beginner/5406/ which c...
[no replies]
1 error
 
#include<iostream.h> #include<string.h> #include<conio.h> const int len=30; enum contract{permanent,temporary}; class Employee{ protected: char name ;...
[no replies]
Copy Constructor for Binary TreeNodes
 
I have a min heap which consists of TreeNode*. I'm doing huffman coding to create a huffman binary tree from the minHeap. Everytime I pop, I need to set the roo...
[1 reply] : Objects that expect to be copied in this way are given a clone metho... (by kbw)
heap problem
 
Hi everbody, I have problems to deallocate 2 vectors in a structure. At the beginning of a function I allocate memory for these vectors. Then I work with the...
[8 replies] Last: You don't. You ask the allocator for a memory block of some size. ... (by kbw)
Linked Lists
 
Hey everyone! I'm having trouble with linked lists. The compiler error I'm getting is that it's a LINKING problem; I think that something is wrong because I'm ...
[3 replies] Last: Actually, I overestimated the quantity. You have two uninitialized poi... (by helios)
Switch
 
I have a bit of code but I dunno if it will work in C++. I found it on the PHP website as I found they are quite similar, and just wondered if it would work. It...
[6 replies] Last: >> JRASKELL i noticed that, just use an if else statement, im los... (by jloundy)
by vijkrr
how to recreate a file while writing
 
Hi, I'm opening a file using fstream and writing into the file. While write is in process if want to recreate if the file is deleted by some one. Can any one...
[2 replies] Last: change your flag from, f.open("log",fstream::app) to f.open("log"... (by jloundy)
by baross
user defined functions and mian
 
Main will not invoke the user defined function..I have been over it a hundred times and have been through the tutorials. So please no tutorials. Can some one p...
[2 replies] Last: your function has not arguments, you simply have (int ,int) so there i... (by jloundy)
exe file icon......?
 
how do i change my program's exe file's icon...
[2 replies] Last: This is not a general C++ programming question. This is a Windows pro... (by PanGalactic)
Gradebook Problem
 
Hello! I'm pretty new to this and I'm having some trouble creating a gradebook. after asking for student id's along with test numbers and test scores, the prog...
[no replies]
Reading a ".xml" file with C++
 
Hey everyone, so recently I got the assignment of creating a C++ program that should be able to read and write to a file called "bookdata.xml". Now befor...
[10 replies] Last: if you see above.. i wrote xerces.. its a good xml c++ parser.. ther... (by writetonsharma)
keybd_event func parameters usage?
 
Hey there i got some comprehensive-troubles with the some of the argmunets passed to the keybd_event function... VOID keybd_event( BYTE bVk, BYT...
[no replies]
Program deletes a different record than what it is suppose to delete
 
I have two default records in my program (P1001 and P1002). When I try to delete P1001 in my program, it deletes P1002 instead. I know this because when I go to...
[1 reply] : We've answered this before for you. Do not repost the exact same thing... (by closed account S6k9GNh0)
How to extract a subsequence from a cahr array
 
hi, I am hemanth. I am inputting data as lines. like 4 3 4 5 6 6 45 65 54 44 34 34 I am Extracting lines using Gets function like char line ; get...
[1 reply] : If you are programming in C++ you can use stringstreams eg: strin... (by Bazzy)
work with char arrays
 
Hello programmers! My english not very well, I'm from Russia. Here is my problem. We need to transmit a string, the size of the string we can calculate. ...
[2 replies] Last: Thank U. I cant use base64 text. And the problem was not there:) s... (by SpbJimbo)
by Adalte
List
 
X .
[no replies]
May 2009 Pages: 1234... 17
  Archived months: [apr2009] [jun2009]

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