49,757 Topics
| |
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. | |
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 … | |
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 … | |
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!!! | |
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 | |
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 … | |
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 | |
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 … | |
[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) { … | |
Hello, i'm trying to get double buffering on my MFC C++ dialog based app in OnPaint() function. How can i do it? Thanks. | |
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 … | |
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 … | |
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 << … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
/* 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. … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.