49,761 Topics

Member Avatar for
Member Avatar for DiscoJesus

I'm pretty low-level at C++, but decided writing up a program to do some playtesting work for me would save a lot of time. Anyway, I'm almost done - been debugging for a little while, and I've managed to bring it down to 16 repeats of the same two errors...and …

Member Avatar for Reisuke
0
1K
Member Avatar for sexyzebra19

I need this for matrix multiplication, I'm putting any 2 dimensional matrix into 1 dimension by column major order, i.e. the matrix 1 2 3 4 is stored as [1 3 2 4]. To try and figure it out I've worked out the pattern for 2x2 matrices: [code=php] data_[1] = …

Member Avatar for dusktreader
0
152
Member Avatar for techie929

/*I am getting the following errors free.cpp: In function 'int main()': free.cpp:24: error: expected `;' before 'obj' free.cpp:25: error: 'obj' was not declared in this scope free.cpp:25: error: expected primary-expression before 'int'*/ [CODE]#include<iostream> using namespace std; int array[]={0,1,2,3,4,5,6,7,8,9}; class free { public: void function(int array[]); }; void free::function(int array[]) { …

Member Avatar for techie929
0
234
Member Avatar for isralruval

i have the following function which works, its encrypts a text file, well its suppose to shift the letters of a text file by whatever the user wants, lets say the text file says "zoo" if the user wants to shift the letters by 1 to the right the output …

0
68
Member Avatar for dusktreader

In my application, i currently make many (parallel) calculations based on a time parameter. The calculation is a parametric function of time, so, each time value renders a unique solution. Currently, I have many threads that are calling the same calculation function, and the time parameters are often the same. …

Member Avatar for dusktreader
0
289
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
132
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

The End.