General C++ Programming - April 2009 (Page 2)

fibonacci
 
im trying to get this code to run,but every time i do it just closes automatically. #include <iostream> using namespace std; unsigned long fib(unsigned lo...
[1 reply] : Ah, here's your problem. http://www.cplusplus.com/forum/articles/7312... (by Duthomhas)
by adem
Strange use of pointers and functions = SO confused!
 
Hi, I was shown this code by a friend and (though I'm not entirely that experienced with c++) I had never seen or known anything such as function()=6 to be poss...
[5 replies] Last: When you call function, conceptually, the function name is "replaced" ... (by Disch)
by dkaip
searching problem
 
Hello all. I am looking for a function size_t a_searchingFunction(wchar_t* word,wchar_t* seachingWord, size_t fromThisPlase){... return ... the place tha...
[7 replies] Last: you can use strstr also like find_first_of like this: char *ptr = ... (by writetonsharma)
by mykolg
Opening File
 
How do I open a file in a sub folder? The code below isn't working for me... string fileA = "dir/book.data"; inFile.open(fileA.c_str()); if(inFile.is_ope...
[4 replies] Last: "~/" That doesn't work. http://www.cplusplus.com/forum/general/103... (by helios)
Suitable header file for serial port or RS232 communications
 
Does anyone know which header file is suitable to be use to generate rs232 communication between two PCs or to set the serial port. What i am doing currently...
[2 replies] Last: If your using Microsoft Visual Studio 2005 C++ - You'll need to downlo... (by Mythios)
by ward
c++ QQ
 
Write a complete C++ program to find area of the cylinder your program should consists of the following functions: ยท Area_of_Circle : void function that acc...
[15 replies] Last: Oh. Ok. I wrote him his program: #include <iostream> #undef ... (by chrisname)
replace string with selected characted into a new character.
 
so i did random generator of letters. so i got s1=qwerty then i imput " Character you want to change" so i put s2=w then i input " character you want to c...
[1 reply] : I'll go ahead and tell you. Your code is bugged, not very fun to read,... (by closed account S6k9GNh0)
Geting these Error using Inheritance in Visual Studio 2008
 
I keep getting the following errors reverse.cpp(10) : error C2653: 'ReserveString' : is not a class or namespace name reverse.cpp(10) : error C4430: missin...
[1 reply] : reverse.cpp(10) : error C2653: 'Re s er v eString' : is not a class o... (by helios)
by vRltwE
Store sctrucs in a matrix
 
Hi, how can I store a struct in a matrix? Supose you have struct vectors { double module,phase; }; I want vector .modul...
[2 replies] Last: Hi Disch, I understand your reply and it solves the question, but..... (by vRltwE)
by vRltwE
switch case with two parameters
 
Hi, I know a switch case with one parameter: switch (i) { case (0): matrix_tmp = 77; } but, how c...
[3 replies] Last: switch only works for integral types (char, short, long, int, etc.). I... (by helios)
bubble sorting array
 
i have the following program: #include<iostream> using namespace std; int BubbleSort(int a ,int arraysize); int main() { const int arraysize = 1...
[2 replies] Last: how would i do that? (by kakashi316)
by ward
examples about call by refrence
 
hi every body i need examples of func void one and its return value so ineed some examples in that cout<<"thank s a lot";
[1 reply] : I'm not sure on what your asking. Please improve your sentence structu... (by closed account S6k9GNh0)
by dkaip
container the container ...
 
Good day all, I must solve a problem and need your help. The problem is that i whant a container of containers in string "today;is;a;good,day;and;i;must,wri...
[2 replies] Last: Thank's a lot. Jim (by dkaip)
C++ STL map issue
 
Which is the safe way to delete a newed pointer on map?? int main() { map<int,A*> aMap; A* o1= new A(); A* o2= new A(); A* o3= new A(); A* o4= new ...
[14 replies] Last: erase takes an iterator. The code is: for (p = mymap.begin(); p !... (by kbw)
Pointer to memberfunction of an object
 
Hello! I would like to integrate a function with gsl. Therefor I have to define a function f (the integrant, which has to be of the form double (*)(double, v...
[11 replies] Last: Thank you very much for your help! (by lostprophet)
How can I get and Display the consoles Mouse position
 
I've tried using the code from http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles5.html But it all seems to just break - It sometimes gives me the position b...
[11 replies] Last: hmmm... you are right .. i started checking the forum between a very ... (by writetonsharma)
MIPS
 
Anyone here good with MIPS assembly language?
[1 reply] : On a C and C++ forum? Try DaniWeb 's Assembly Forum http://www.da... (by Duthomhas)
using constuctors and destructors
 
I have to label a pc and im just trying to get the basic down. later I have to put in a disturctor and have come down to one error. any advice on this i have be...
[6 replies] Last: EDIT -- line numbers in this post are referring to the line numbers in... (by Disch)
glibc and seg fault error
 
I keep running into problems with my program to evaluate baseball stats. When I try to INPUT filename I run into glibc and if run TEAM identifier then i get a ...
[1 reply] : I don't see anything out of the ordinary here. Post your code for Play... (by helios)
Line Counting Challenge
 
On CProgramming.com, you can find a couple of challenges. The first one inside of the Help-Free section of the challenges is a line counter. #include <fs...
[2 replies] Last: Yeah, my code is fail sauce. It doesn't even do the right thing when I... (by closed account S6k9GNh0)
April 2009 Pages: 1234... 20
  Archived months: [mar2009] [may2009]

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