General C++ Programming - September 2009 (Page 7)

dereferencing pointer to incomplete type
 
Hey Guys, Below is the code glob.h #ifndef GLOB_H #define GLOB_H const int LEN=10; struct myStruct; struct myStruct *head; #endif temp...
[2 replies] Last: Wow, that is so weird. Last night I tried to define struct in my heade... (by kevinchkin)
by Oromis
Divide string into chars
 
Hello, The following programs should divide a string into seperated characters. It works, but is it valid? Is there a better/more standard way to do this? ...
[4 replies] Last: Oke, thank you. The operator seems a lot easier to use ;) (by Oromis)
by Gabi
copy constructor problame
 
Hi, I don't understand what is wrong with my code: class foo { public: foo(){}; foo (foo& f) {}; foo f(){ return *this; } }; ...
[4 replies] Last: Thank for the answers, now it's clear for me. :) (by Gabi)
by mc1982
Error, Type name expected in bcb 2007
 
Hi guys, I am porting a program into bcb2007 from vc6.0. Here is my problem. I made a class called Point which is inherited by the class vertex. Then i...
[9 replies] Last: Yes i would agree but i actually use it to minus distances since im mo... (by mc1982)
if-else + switch
 
I am enrolled in a c++ course. I was given a lab today after having a lesson on switch statements, which is great because we were told to not use switch for the...
[7 replies] Last: Ah, yes. Howerever, my professor instructed us to use only the if-else... (by mattzorx)
sorting
 
i need to sort 3 values: -1, 0, 1. They are received from a function. Is there an easy way to do this without using a bunch of "if" statements.
[3 replies] Last: Bubble sort? (by mcleano)
by privs
Starting/Stopping exe's
 
does any1 know how i can quit an exe from running and then restart it from a C++ program using borland 2006 c++
[10 replies] Last: I don't see how either of your posts are productive My first post was... (by Bazzy)
by DBarzo
Memory buffer implementation
 
Hi, maybe my code is ugly (and suggestions are welcome).. I've implemented a simple buffer class that store data in a vector. A part of this class is thi...
[7 replies] Last: Thanks to all for the explanations! Daniele. (by DBarzo)
How can I save a web page using C++?
 
My teacher has asked me to write a program that: *Reads an url from the keyboard (VERY easy) *Saves the page's source code (.html) in the computer (WTF?) ...
[3 replies] Last: On Windows, there are plenty of simple methods from URLDownloadToFile(... (by george135)
New at C++, getting weird errors.
 
Okay, so I'm a beginner at C++. I have this homework problem: Write a C++ program that computes and outputs the volume of a cone, given the diameter of its b...
[10 replies] Last: Thank you! Yeah, I changed that to double with the rest :) (by Joliedoll)
I can't make sense of open sorce code
 
Is there any good tutorials or documentaries on understanding c++ open source programs? I tried looking at vlc and had no clue what was going on so I decided to...
[10 replies] Last: http://www.amazon.com/Code-Reading-Open-Source-Perspective/dp/02017994... (by turbozedd)
Beginner error expected ;
 
So I'm new to C++ and I don't completely get the syntax and I'm getting some errorx #include <iostream> using namespace std; class Car{ public: ...
[3 replies] Last: Thanks guys, sorry I overlooked the beginner section, I was in a bind (by DamagePlan)
Simple Input question
 
I'm having a hard time figuring out how to do this: I've searched around but couldn't seem to find anything. I would like my program to accept input entered...
[3 replies] Last: You can check out this too: http://www.cplusplus.com/forum/articles/1... (by firedraco)
file * question
 
can fprintf be used to write to a file that is opened with this syntax? ofstream file1("data.txt"); or do they have to be used as FILE * file1,?
[1 reply] : No, but you can use sprintf() to write formatted string into a char , ... (by R0mai)
Question regarding "::operator="
 
Hey, I would like to copy the data from one class "Point" to another, however the class contains a pointer to an object of class "Line" in an array, which is n...
[no replies]
by wtf
How use these functions? CryptGenKey( ) CryptAcquireContext() CryptGenRandom()
 
and how are they used? can i use them to supplement my own key generator to provide extra security? do they use cryptographically secure algorithms? How do I...
[3 replies] Last: Agreeing with Jsmith here. Why develop your own crypto algorithm which... (by MaxT)
how can i give output file in fstream
 
hi, i have to direct my output of my c++ code to a file of my desired location (say, on desktop of my pc). please say, which command of fstream will tak...
[1 reply] : You want to redirect cout? http://www.cplusplus.com/reference/iostrea... (by Bazzy)
debug vs. release
 
Hi! I am using the Microsoft Visual Studio to build a program that has several threads. The threads communicate among them reading a shared variable; thus, a...
[8 replies] Last: (could I have any problem with other compilers..?) In theory,... (by jsmith)
comparing objects
 
how do we compare 2 objects if the function declaration has only one object as its parameter: i.e. int compare(const school& teacher). "school" is the name ...
[4 replies] Last: @firedraco I think compone87 means this: int compare(const school& t... (by Bazzy)
by xxFxx
memory leaks!
 
i keep getting memory leaks and i tried several method from google on how to avoid it but it still there. anyone knows how to fix this? h file cla...
[1 reply] : In push, the new node's next pointer isn't set to null if the list isn... (by kbw)
September 2009 Pages: 1... 56789... 14
  Archived months: [aug2009] [oct2009]

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