General C++ Programming - October 2011 (Page 5)

by orxshi
Suddenly a variable value changes
 
Hi all, I have a strange problem. Inside a loop after a certain number iterations value of a variable changes. Nowhere in the loop I try to change its value ...
[6 replies] Last: SOLVED: I declared my arrays as, int var but it should ... (by orxshi)
Private public errors
 
I have the following class class student { private: char name ; public: student *left; student *right; void setName (char nm ) ...
[1 reply] : You can use a different return type char getName (char nm ) { re... (by strongdrink)
HEAP CORRUPTION DETECTED with openframeworks
 
hey guys, I trying to get my openframeworks to work, but when I exit, I get the HEAP CORRUPTION DETECTED error. also my output image is completely black for som...
[1 reply] : Build with debug symbols and run it under valgrind or some similar mem... (by Moschops)
C++ how to generate students’ transcripts using binary file processing?
 
I am totally lost and don't know where to begin with this lab assignment. please help me guys. i am suppose to output this Wish to see another student (y ...
[5 replies] Last: This is a guide about what you should do, this is not an implementatio... (by mrkhn)
Correctly Displaying Characters of Other Languages
 
So I'm having a problem with displaying the 'ã' character, which is an a with a tilde on it. Originally, I had an issue with displaying characters with any acc...
[3 replies] Last: apologies if my answer was too short and uninformative. i only have kn... (by Ng Han Seng)
by cypro
Reading integers from file skipping some chars
 
Hello, I am learning now the C++ language and I have some problems on reading files. I have to read a full-format time (hh:mm:ss) and what i want is to store...
[2 replies] Last: So smart, so simple, Thanks man is working! (by cypro)
Random Access files
 
Hi..this is my coding. Its compiled successfully. But i could not get my result. I don't know whether the data stored in the file successfully or not. Please He...
[3 replies] Last: On your call to open, you need to pass along the fact that you wish to... (by JMJAtlanta)
by HenriK
Reading file including already set byte shift?
 
Hello, fellow programmers! I was wondering if it could be possible to read a file including byte shift in C++ . Here's an example: example.txt Hello,...
[4 replies] Last: OK, I see. Then I guess I have understood byte shifting. Thanks a lot! (by HenriK)
by alend
ifstream::good problem in windows and linux !
 
I have written a program which uses vector::size. vector<string> myString; then fill it with some names. I used myString.size(); to find out the s...
[5 replies] Last: Er, well, that example works, but it is still not a very good example ... (by Duthomhas)
iostream cin.clear does not clear input stream
 
Hi folks, I've been searching the Internet for the answer to a common problem. When I use cin in a program, cin receives an invalid character without the use...
[3 replies] Last: http://www.cplusplus.com/reference/iostream/ios/clear/ (by Syuf)
How will Calculate the string
 
char str ="15+20+18-10" here how will convert the string as integer and negelate the Symbols. And calculate these numbers. Please help me. Output : 43...
[1 reply] : #include <iostream> #include <sstream> using namespace std; int m... (by Syuf)
Graphics.h problem....
 
I am unable to write text using outtext or outtextxy while I am using putpixel function.....the text does not get displayed...please help asap....
[1 reply] : None of these functions are part of the C++ standard. You'll need to e... (by Moschops)
by dkXIII
Cipher message
 
I have received cipher documents which are believed to be secret messages. So, my mission is to break the encoding and reveal what the secrets are that each fil...
[1 reply] : You need an fstream: http://www.cplusplus.com/reference/iostream/fstre... (by coder777)
Need help printing on screen
 
I have everything I need to put it into a file and read the file. But I also want to print it on the screen after the user puts in the info needed. Any help w...
[1 reply] : much appreciated if you could use the code tags we have here :) as the... (by Ng Han Seng)
Passing Class object to the same class method
 
Hi folks, I have written code to random access files in c++ . I got result without creating a method for write a record to the file. I have given the code snipp...
[no replies]
"Undefined Reference to..." in Template Class
 
Good Evening, I have two template classes, cut down versions are shown below: // ClassA.hpp #ifndef _ClassA_hpp_ #define _ClassA_hpp_ #include <io...
[5 replies] Last: Class B maintains a list of all instance's of class A that are created... (by Philip Lee Bridson)
Reading in Data using fstream
 
I am trying to write a C++ program that takes a text based file, reads the stream and produces a bunch of classes and structs out of it that I can later use for...
[3 replies] Last: I'm not entirely sure that you and I are using "header" with the sam... (by trentkg)
Problem reading Binary data from file
 
Hello, I am having trouble with reading single bytes of data in from a binary file. The data I'm reading is to be interpreted as an integer, so when I read ...
[2 replies] Last: Helios, OMG, thank you. That was it. I realize now that the uint8 t... (by nwallace07)
please help me with my program.
 
My program seems to always print out "temperature is valid" for every set of data. It would be appreciated if someone could get me over this hump as I need to h...
[3 replies] Last: Can you post your code as it is now? Also, don't start parallel threa... (by helios)
by Modify
Erasing part of the string
 
Hello, lets say string abc = "1000 11 1100" How can I actually erase 11 from the string, without using string.erase since it requires position. And I don'...
[1 reply] : I would recommend using a combination of string.find_first_of and stri... (by Philip Lee Bridson)
October 2011 Pages: 1... 34567... 36
  Archived months: [sep2011] [nov2011]

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