49,757 Topics

Member Avatar for
Member Avatar for problemkid

Hi i would like to ask what are the advantages of a dummy head linked list and what is the implementation steps? And if it is not too troublesome, i would like to ask how many linked list are there around.

Member Avatar for Narue
0
109
Member Avatar for macdougc

Hi I have encountered a problem using vectors. I have a vector<char*> in a for loop, adding a char* to it after each iteration, but when I exit the loop and run through the contents of the vector, it has 4 copies of the final char* added. Here is the …

Member Avatar for Salem
0
156
Member Avatar for bobsta

Hi, I am new to OpenGL and am trying to render a scene (off screen) to a frame buffer. In particular I have a number of polygons, each lying in a different z-plane. However the vertices in adjacent polygons are not connected, i.e. I have a plurality of polygons and …

0
51
Member Avatar for corby

question: Two pointers that point to different arrays cannot be compared meaningfully. That's false right? because they can be compared in the same manner as integers are correc? if i am wrong please explain y or if u have anything to add please do!!!

Member Avatar for Dave Sinkula
0
174
Member Avatar for Ayaat Monem

I'm in the first grade in the faculty of computer science.As we learn programing so slow,I decided to go on by my own.Know is time to do the first game.Just want ideas to execute.The other thing want to read about moving objects,where can I find it! Thanks

0
54
Member Avatar for angels21usa

I don't know anything about programming but I would like to figure out how to program this idea I had for calculating prime numbers. I know that this looks a little bit jumbled, but logically it should work. My basic idea is that the square root of the first number …

Member Avatar for angels21usa
0
94
Member Avatar for ramya

Please can somebody help me with Question Papers and answer Papers on [B]C, C++. [/B] I have a Interview tomorrow. Thanks and Best Regards, RAMYA

Member Avatar for mahesh.kumar
1
248
Member Avatar for gnarlyskim

So I've missed the past week of my C++ class due to the SEC swimming championships being a week long :@, and I've missed the whole topic on file processing. I've been reading the slides and a few tutorials via lovely google searching, but it's a little hazy. Can anyone …

Member Avatar for gnarlyskim
0
143
Member Avatar for paulojrudi

[I]<<split from [URL="http://www.daniweb.com/forums/post634169.html#post634169"]here[/URL]>>[/I] [QUOTE=Duoas;634670]If all you want is teletype output (like you get on the console, without any fancy graphics or fonts or etc) you can open the PRN or LPT1 device: [code=C++] #include <fstream> #include <iostream> using namespace std; int main() { ofstream printer( "prn" ); if (!printer) { …

0
44
Member Avatar for ge6a93

Hello, i'm trying to get double buffering on my MFC C++ dialog based app in OnPaint() function. How can i do it? Thanks.

0
58
Member Avatar for mrinal.s2008

Hi, In the code snippet below, I tried to write the contents of a vector to a file using ostream iterator. However, when I try to read the contents of the file using istream_iterator, there is a problem. When the istream_iterator object is initialized using ifstream object fin, the istream_iterator …

Member Avatar for mitrmkar
0
294
Member Avatar for xcarbonx

hello, i have been struggling with this program for a few days now, and have decided to get some feedback. The program lets the user input a number from 0-6 (0 representing sunday and 6 representing saturday, and so on) for days of the week and you input a second …

Member Avatar for tetron
0
134
Member Avatar for merse

Why get the last char twice? [CODE] #include <iostream> #include <fstream> using namespace std; int main (int argc, char* argv[]) { if (argc == 1) return 0; char c; for (int i = 1; i < argc; i++) { ifstream input; input.open(argv[i]); while (!input.eof()) { input >> c; cout << …

Member Avatar for Salem
0
86
Member Avatar for doddware

The project that I'm currently working on is for an large embedded application with a multi-person team. During a recent review of the code I came across the following statement [CODE]bSlcIsolated[logical-1] = (!!p_bIsolated);[/CODE] The interesting part is the double inversion [CODE]!!p_bIsolated[/CODE] The register being double inverted, is a private byte …

Member Avatar for Salem
0
183
Member Avatar for wtvrinc

I am trying to read multiple files which contain values under various Column headers (like pressure, temperature etc)...I using "infile" to read values and assign it to a structure. However whenver there is a bad character in the file or less number than the number of parameters, the output gives …

Member Avatar for kesh1000
0
87
Member Avatar for elexender

Hi, I am using CodeGear c++builder. Im trying to make a GUI to read, write and modify an .mdb( ms-acces) file. In my form i use TQuery, TDBGrid, TDataSource. So im able to load the database in the TDBGrid using SELECT. I can also use UPDATE, INSERT so that i …

0
59
Member Avatar for ndali
Member Avatar for riotburn

I am trying to use Newtons method to find implied volatility of a Black Scholes Call. So given all the other variables, I need to find what volatility makes the black scholes call equal to the current call price. I'm running what I have below but keep getting a random …

Member Avatar for riotburn
0
1K
Member Avatar for wtvrinc

Hello I am trying to get this function to work... [CODE] int error(const char* s) { int f=1; while (*s!='/0') { if(*s=='/') { f=0; return(f); } s++; } return f; } [/CODE] I want to find out if in the string tat i am passing there is a character "/"....But …

Member Avatar for wtvrinc
0
111
Member Avatar for isralruval

i have the following code which works, well its suppose to shift the letters of a text file by whatever the user wants, lets say the text file says "hi" if the user wants to shift the letters by 1 to the right it will become "ij" ok but the …

Member Avatar for Salem
0
126
Member Avatar for eternaloptimist

/* i have forgotten how to do the setw for the output (ex. Find Holland, Beth: 5)...getting all of the numbers to line up. also, i need to know how to modify this program so it reads in 20 strings from a file. i want to name the file names.dat. …

Member Avatar for vmanes
0
249
Member Avatar for react05
Member Avatar for alexa868

Hey everyone, so I'm new in object oriented programming so I'm not sure about how to write this program. I need to create a die game with the class: DIE, that rolls the die. it needs to have a method called: "roll" that rolls the dice again and it needs …

Member Avatar for jonsca
0
131
Member Avatar for EvilNerd

The assignment is: A. Present a menu like the following: 1. Enter a char 2. Enter a string 3. Enter a float 4. Enter an integer 5. Display the sqaure of numbers from 1-100 9. Quit the Program Enter the Program B.The program should not quit until the user chooses …

Member Avatar for Anarionist
0
187
Member Avatar for anthony5557

Hi guys, I have to write a program with a class that will take the number of the day in a year and display the month and day of that number. I'm stuck from the start. Can anyone give me a start that I can run with. I also need …

Member Avatar for jonsca
0
157
Member Avatar for igodspeed

Hello, I am try to compile this code using gcc in ubuntu. I get the error 'btree.cc:(.text+0x55a): undefined reference to `std::cout' '. I thought if i added using namespace std; it would start working but i am still getting the same error. Any suggestion on how i can fix it. …

Member Avatar for igodspeed
0
238
Member Avatar for XinJiki

Hello, I need some help with my homework assignment fir my C++ class, here is a description of the assignment: Write a program that reads this file and finds the longest word that contains only a single vowel (a,e,i,o,u). Output this word (there will actually be several ties for the …

Member Avatar for XinJiki
0
240
Member Avatar for oxy77

I am trying to write a summation to aprox. pi. I am using a for loop and I cannot figure out where I am messing it up. I keep getting "program has exited with code 0" [CODE]for(int N = 0; N <= 15; N++) {double x9 = 0.0; for(int n …

Member Avatar for oxy77
0
96
Member Avatar for futura

Please excuse me if this has already been covered before. I'm a C++ beginner, and in of the problems I have to do, the input has to be like this: 1) A number n is entered. 2) n number of strings are entered. I tried using a 2D character array …

Member Avatar for futura
0
84
Member Avatar for StaticX

Hi all, im wondering if someone could offer a solution to my current problem which is passing and return information using pointer notation. I have created a small program using the class Person, who has a first and last name and methods to add and retrieve this information which looks …

Member Avatar for Jiwe
0
98

The End.