Beginners - February 2010 (Page 3)

by dp5000
Writing input to a string
 
Why does the following code return an error at runtime? #include <iostream> using namespace std; int main() { char *filename; out << "Enter file...
[1 reply] : first of all there is 'c' missing in the line 3 of main function and ... (by amit0991)
writing to a text file
 
Hi guys, How would write this into a text file using fprintf. p = 0x0174C0 q = 0x01D9E8 r = 0 #split p,q,artunc\Axelr.bin So I get the result be...
[2 replies] Last: Thanks for the help kbw much appreciated (by dante300981)
Problem with structures.
 
I was looking through the data structure tutorial and I thought I will do my own example for structures, but it gives the following errors. Even the sample prog...
[3 replies] Last: I've just tried your code in my compiler (MS Visual C++ 2008) and it c... (by Danielsson)
by wasabi
Unknown syntax in code
 
I'm helping to debug a friend's code but have just bumped into some very weird notation that I simply cannot understand: double testValueC2 = (((_data )[itEle...
[4 replies] Last: http://www.cplusplus.com/reference/stl/map/ (by firedraco)
reading external input file with no data
 
I am writing a program to read an external input file. And one of the conditions i'm trying to put in is if there is NO data in the external file, the program ...
[7 replies] Last: If you have a fixed number of elements to read in, using exceptions ca... (by PanGalactic)
by ender2
Using input to call a member function
 
I'm a moderate C++ programmer at best, but I have the need to insert whatever is entered as input to call a member function. for example... assume there's a cla...
[3 replies] Last: I think you ought to rethink your design pattern here. Also, I don't ... (by Duthomhas)
by Infos
Display all processes in a ComboBox when it's clicked
 
This is what I've done so far... What's wrong with it? private: System::Void comboBox2_Click(System::Object^ sender, System::EventArgs^ e) { DWORD aPr...
[2 replies] Last: error C2664: 'GetModuleBaseNameW' : cannot convert parameter 3 from 'c... (by Infos)
I guess a misuse of push_back ?
 
Hi, I am Java programmer but need to write a small program in c++, and many things are confusing to me. I have been fighting quite a lot on this (simple) bit...
[1 reply] : Actually the problem was coming from somewhere else but showing here. ... (by vince78)
heap overflow
 
Hi I got the following error message: Debug Assertion Failed! Program: .exe File:f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c Line:584 Express...
[2 replies] Last: Hi, actually spalten takes such garbage values... but I cannot figu... (by studentffm)
Opening a created document using c++ and visual studio 2008
 
So I've wrote a program that asks the user for a file output("test.txt, etc.) and then the program writes to that document. What I would like to do is, after t...
[4 replies] Last: Care to explain how shellexecute can be implemented in visual studio? ... (by j10lance)
Preferred way of passing by reference
 
AFAIU there are two ways to pass by reference void SomeFunction(int& Argument1, int* Argument2) { Argument1 = 1; *Argument2 = 2; } which is used as...
[7 replies] Last: moorecm & firedraco: I concur. Did a little research, and I do believe... (by conciliator)
Loop through #defines?
 
How would I loop through a set of file path #defines? I understand you can use enums to loop through integers, but it does not work for strings. I have a set o...
[2 replies] Last: +1 to what tummychow said. break the habit of using #define for con... (by Disch)
Writing a simple program???
 
I'm taking an introduction class in C++ and need a little help with an assignment. I need to write a simple program for the following: Write a complete progr...
[5 replies] Last: See the side bar and click "Information" then type "code tag" [witho... (by waynev)
test..
 
i need to make a txt based RPG not a whole game... but their's an enemy... with health and an attack... and after we kill one... another one must appear...and ...
[2 replies] Last: What's up with all the ellipses where periods are supposed to be in a ... (by tummychow)
by EEVIAC
curious about cout.setf()
 
#include <iostream> using namespace std; int main() { cout.setf(ios_base::fixed, ios_base::floatfield); float tub = 10.0 / 3.0; double mint = 10.0 / ...
[2 replies] Last: Please use code tags. See "information" listed the side bar. (by waynev)
by waynev
// file size
 
Compiled the following code to obtain the file size for: example.txt, and the file size was not returned when ./myfile was executed. ./myfile returned the pro...
[7 replies] Last: Thanks to all for your input :-) (by waynev)
Question about constructor
 
I am trying to understand the meaning of the following constructor in a class (for creating fractions): class fract { private: int numerator, denominato...
[1 reply] : Look up "initializer list". In this specific case, the two syntaxes... (by jsmith)
by EEVIAC
What directory is iostream located?
 
I'm using MS Visual C++ 2008 Express ED, on Windows XP.. What directory is the iostream file located?
[4 replies] Last: thx (by EEVIAC)
Input/Output Functions?
 
How do I make this into a function? I've been trying to figure it out over the last 5 hours and have not gotten anywhere... #include <iostream> #include <str...
[7 replies] Last: I found out I need to do a function for Input and a function for Outpu... (by vection)
how do I ensure that the encoding is ascii??
 
I am reading one file and saving it in another file one character at a time. If I cout the character to the console I see what I want to save in a file as ascii...
[5 replies] Last: If you care this seemed to work: void copy_by_line(ifstream *ist, of... (by closed account iw0XoG1T)
February 2010 Pages: 12345... 32
  Archived months: [jan2010] [mar2010]

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