General C++ Programming - March 2010 (Page 2)

loading a graph from txt file
 
I have finished implementing my graph and the adjacency matrix. Now I have to save it to an txt file...
[1 reply] : So, what? Have you looked at file streams? (by closed account S6k9GNh0)
Can anyone spot a problem with this code?
 
#include<iostream> using namespace std; class DumbBell { int weight; public: ...
[11 replies] Last: what line is the error? as far as i can see from the error, it is t... (by chimera)
Problem with writing to a file
 
Hi. This is my first post in this awesome forum. I have problem with these codes: #include<io...
[11 replies] Last: The insertion and extraction operators ( << and >> ) both have built-i... (by jRaskell)
i have a problem with that coding
 
#include <iostream> #include <string.h> #include <string> using namespace std; /*...
[4 replies] Last: Thanx a lot for the code... so if i wanted to add this chars how co... (by badiparmagi)
Make string of variable/member/class name
 
Is there a way to make a string of a class member name? Let's say I have a class named MyClass with...
[1 reply] : I don't know about _hook, _ref and CI_GET. Maybe that's some stuff to ... (by imi)
std::ostrstream is not buffering data properly
 
I am using following piece of trouble code on my project. I have few problems with this.. code i...
[5 replies] Last: oups. I did read stringstream, and not strstream. :-) Yep. That's w... (by imi)
How to catch error : The memory could not be read.
 
Hi all, I am experiencing this error: The instruction at '' referenced memory at ''. The memory c...
[6 replies] Last: Yea.. VARIANT is not part of the standard lib. I got the feeling, ... (by imi)
copying char array contents into char pointer array
 
hello every one am new to this forum.. and i need urgent help regarding how to copy contents of cha...
[2 replies] Last: thank you very much.. i'll try this.. (by yakubpasha)
How numbers are rounded
 
How are floats rounded to integers in C++? Does it only round up, or does it work like this: ...
[5 replies] Last: double round(double num) { return (num > 0.0) ? floor(num + ... (by closed account z05DSL3A)
by JHO
I am becomming confused
 
I have two programs that I am having trouble makeing here are the steps 1. write a program that dec...
[3 replies] Last: int A=1;//declare and initialize variable A with constant int 1 fl... (by Dacster13)
Web browser data
 
I was wondering how I would go about taking an integer from an html table in any popular browser and...
[6 replies] Last: Thank you very much. I will try it when I get the chance. (by omen4669)
Do while & for loops have to be executed at least once?
 
I have a question: Will the statement block of a while loop be executed at least once? Also, sam...
[3 replies] Last: you just pointed the difference between a do-while and a while loop. ... (by maikel)
C++ copy constructor trouble =(
 
I'm having trouble getting my code to work properly. I have two classes: Vertex, which represent...
[7 replies] Last: vector frees its own memory, and since you didn't allocate anything fo... (by imi)
TI-84 and C++
 
I have made a couple programs to help me out in math in C++, and I was just wondering if I could con...
[4 replies] Last: Z80asm is the only way to program TI processors. As an avid fan of the... (by tummychow)
by badny
fread
 
Hi there! I´m triyng to copy the header of a BMP file into a defined struct inside my code. This ...
[14 replies] Last: That header sucks. With it, you dont get any information about the bm... (by imi)
Anyone to fix this??
 
//example of constructor #include <iostream> #include <string> #include "simple.h" class Simpl...
[14 replies] Last: In that code there is a declaration for a no argument constructor for ... (by closed account 1yR4jE8b)
g++ Code Size
 
Today, I noticed that a simple HelloWorld program compiled with GCC 4.4.1 compiles to about an 850kB...
[11 replies] Last: Sorry, that's my bad, I'll be the first that'll admit that I CAN be a ... (by closed account 1yR4jE8b)
Modifying a Program with Functions
 
I need a little assistance with a program I need to modify. Here is the original code. #include <...
[1 reply] : It looks like you have some functions that you need to define. These a... (by sammy34)
Validating Password
 
This is a homework assignment that I'm trying to get a little direction on. The assignment states t...
[3 replies] Last: Thank you MorningStar that was a tight piece of coding. Even better I... (by Hopeless Programmer)
Ping , How should it be done ?
 
Hi all! I need to make a program which pings a target and gets timeout value for each request.This ...
[4 replies] Last: Thanks for answers, IcmpSendEcho Function seems quite useful. (by Dufresne)
March 2010 Pages: 1234... 23
  Archived months: [feb2010] [apr2010]

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