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

by mrgone
Write function replaces In C++
 
Write function replaces (CStack STK, oldch const char &, const char & newch). If the stack is oldch, then replaced newch thank you
[2 replies] Last: How much are you paying? (by chrisname)
by dvdanh
copy (CStack <T> STK
 
method copy(Stack &otherstack) { otherstack=*this; }
[1 reply] : We can't do your homework for you, we can only assist you. (by kbw)
Printing using ostream_iterator and copy
 
I can do this: vector<int> v; //Code that fills up v copy(v.begin(), v.end(), ostream_iterator<int>(cout, "\n")); Can I do something similar if I h...
[2 replies] Last: Thanks ! (by DexterMorgan)
why this code is true?? (1,2)
 
hello to all. please somebody explain why this code is true: #include <iostream> #include <cstdlib> using namespace std; class Foo { public: v...
[26 replies] Last: Wasn't there an episode of Star Trek TNG or something that had a Dyson... (by Disch)
LNK1169 Error
 
/* Nick Vincent */ /* Homework 2 Reading and printing a sequential file */ #include <stdio.h> int main() { int id; /* account number ...
[4 replies] Last: you're right, it was defined twice. All is well now it works. Thanks... (by Nvincent4708)
by genny
concatenate variable naming
 
I was wondering if it's possible to concatenate the name of variable. for example : if i=1 then the name would be : int variable1; if i=2 then the name w...
[1 reply] : as far as i know only in terms of the preprocessor with the ##-operato... (by Incubbus)
Linked list, how do I put this in a class? compiles but crashes
 
I coded this without putting it in a class and planned to do it at the end, it has been giving me a little trouble. Its a pretty long code, so any tips would b...
[6 replies] Last: seems a few of the other crashes take me to: xstring int __CLR_OR_... (by RLB31384)
by meesa
[C++] Open/Close the CD Drive
 
Okay, I've found several ways to do this in Windows, but I'd like to know how to do it cross platform? Basically, I'd like to know how I can make a CD/DVD dr...
[4 replies] Last: Okay. Thanks for the replies. (by meesa)
Linked list, will compile but crashes?
 
I have a program that is a linked list of books. It compiles fine when I had all the code outside of a class. I was trying to put a class in it, and make a sp...
[8 replies] Last: okay my new code is doing the same thing, ill post all of it at the li... (by RLB31384)
find the position in a stream
 
How can i find the position of a especific char in a stream ? For example, i need to open a txt file and read line by line, each line has some characteres and ...
[1 reply] : To find a character in string, use find(): http://www.cplusplus.com/r... (by Null)
tr1::array ?
 
Hi Guys, Can someone please tell me when is it advisable to use tr1::array instead or C-style array? And how tr1::array is different from C-style arrays, ot...
[1 reply] : Well.. std::tr1::array has cool member functions! :-D If you ever c... (by imi)
method copy & Display STACK
 
i need method copy & Display of data structure STACK
[2 replies] Last: bumping doesn't get you anywhere, they hate that. Try edting next time... (by foobarbaz)
by Disch
Partial Template Specialization
 
I have a situation where I will have multiple classes that are all pretty much the same, but have different underlying types. The obvious solution here is to u...
[15 replies] Last: That doesn't answer the problem of UTF conversion and string handling.... (by Duthomhas)
by manojr
public in parent but private in child
 
Take a look at following code. #include <iostream> using namespace std; class Parent { public: virtual void call() { std::cout << "Paren...
[3 replies] Last: Some more explanation: Most C++ newcommers I encounter which wonder ab... (by imi)
Problem when asking for user confirmation!!
 
Hellooo I am a new beginner of C++. I've found difficulties when doing the following simple programme..... Please help!! #include <cstdlib> #include <s...
[3 replies] Last: I got it !!! FINALLY~!! Thank you guys ~ jRaskell and buffbill. (by francis1212)
Visual c++ Link Error
 
i selected new project -"win"--win application.. empty project...added a main Source.cpp file and build gives error cannot open file "Debug/win.exe" ...
[1 reply] : You had to select "console application", I guess (by Denis)
matrix multiplication and addition
 
Develop a program which computes the current value of the vector {x} based on the following forward iteration: {x}(n+1) = {x}(n)+ {z}, n = 0,1,2,3,4. ...
[4 replies] Last: thanks alot!!!! that along with rearranging my loop produced the desir... (by arperidot)
robocup!
 
Hello. I want to program robocup which computer plays football. What topics of C++ should I learn? Can somebody help me? thanks.
[12 replies] Last: I just want to work on robotics simulation. (by majidkamali1370)
Converting C to C++
 
Can anyone convert this code, which is in C, to C++ please?? #include <stdio.h> int main() { int i = 0, m, l; char strNames ; gets(s...
[1 reply] : Copied code? No need to make new topics for this sort of thing, really... (by Zhuge)
by Trav
Cls Alernative
 
I've never used any system() command yet, and I don't want to. What is a good alternative to cls,and not a hole lot of \n's.
[1 reply] : Here you go. http://www.cplusplus.com/forum/articles/10515/#msg49080 ... (by Duthomhas)
March 2010 Pages: 1... 20212223
  Archived months: [feb2010] [apr2010]

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