49,756 Topics

Member Avatar for
Member Avatar for Rachel Ross

Look up Simpson’s Rule and explore the effect on this integration method of changing the strip size on the error. Also, explore the effect of changing the strip size in the left-hand and right-hand rules for integration. Compare the convergence of the integral as the strip size decreases for all …

Member Avatar for daviddoria
0
114
Member Avatar for doktor9

Hiya Guys!!! Am hoping you guys can tell me what I'm doing wrong. My Code compiles, and seems to run OK up until it gets to the "if" statement towards the end. Instead of waiting for a response it just closes. [CODE] int main() { cout << "\n\t\tWelcome to Doc's …

Member Avatar for mrnutty
0
105
Member Avatar for William Hemsworth
Member Avatar for William Hemsworth
2
7K
Member Avatar for hussey001

[CODE]#include <iostream> #include <fstream> using namespace std; void countWords(fstream &myText, int word); void countLines(fstream &myText, int lines); void wordLength(fstream &myText, int length); int main() { char textLine[100]; int lines = 0, word = 0; fstream myText; myText.open("myText.txt", ios::in | ios::out); if (!myText) { cout << "Cannot open file - myText.txt" …

Member Avatar for Fbody
0
105
Member Avatar for gaurav_13191

Hi, I have the following code which compiles fine but does not produce any output.. [CODE] using namespace std; #include<iostream> #include<cstdio> #include<conio.h> struct node { int data; struct node *link; }; void append(struct node *,int); void addatbeg(struct node *,int); void addafter(struct node *,int,int); void display(struct node *); int count(struct node …

Member Avatar for gaurav_13191
0
95
Member Avatar for wizrad

So I have this really simple situation and I have no idea what is causing this error. This is the relevant bit: header: [code=c] class foo{ void bar(int n); } [/code] cpp: [code=c] #include "foo.h" foo::bar(int n){ }; [/code] And then, from the main function in a separate .cpp file, …

Member Avatar for Fbody
0
262
Member Avatar for Andreas5

Hello, i got stuck again. When i read the text it all makes sense, but putting it all to use is a different story.:zzz: Accelerated C++ excersise 15-4: [QUOTE]15-4. Add an operation to reframe a Picture, which changes the frame characters. The operation should change all of the frames in …

Member Avatar for daviddoria
0
116
Member Avatar for Lukezzz

Hi, I have a code where I upload a file to a server. The code is shown below. As seen I use a loop to try to connect 10 times if attempts is failing. I have also put this in a try/catch block and at the end, I am showing …

Member Avatar for Lukezzz
0
231
Member Avatar for Lukezzz

Hello, I use a a flashcontrol in the Form application. If I have Flash installed on the computer, the control plays the movie fine. If I uninstall the flash from the computer, I receive this error when opening the form. I have tried to put this code inside a try{} …

Member Avatar for cgcgames
0
173
Member Avatar for iamcreasy

Can anyone tell me how to compile "mingw-util 0.3"? I am a little confused, when some article says "use make command and it is all done".But "make" command in unknown in my command prompt.I have MinGW installed which comes with codeblocks. I need it to compile MySQL driver, to use …

Member Avatar for iamcreasy
0
114
Member Avatar for helpme87

So i am trying to make a program that takes the date from windows (this is not where i have the problem). My problem is i want to use that date and create a txt file for each day. For example it would create a file named... 8_4_2010 for today …

Member Avatar for helpme87
0
154
Member Avatar for aabi

hi i m using widos 7 64 bit home edition and want to use borlandC++ taht is not supported by 64bit OS so i install DOSBOX0.74 and try use borlnad in it but seems to me not working as it firstly dosbox can not able to initialize some of it …

Member Avatar for aabi
0
308
Member Avatar for pdk123

Hello All, I need your help to understand , if the following code is ok ? (Baically to have polymorphism of different argument types ) class A{ ... ... public: int function( structA *ptrA); int function( structB *ptrB); } I am getting the compilation error saying the syntax error at …

Member Avatar for pdk123
0
117
Member Avatar for sbrohee

Dear all, I am completely lost and I don't see at all my mistake! I thought this would be a very easy step in the building of my classes. Thanks a lot for your help! In the context of graph theory, I have a class Node. As attribute of this …

Member Avatar for sbrohee
0
350
Member Avatar for Allophyl

When I ran a program that had a list of integers with 5000000 elements in it, I was surprised to find that it used 118MB of memory, even when the *only* thing done by the program is the creation of the list. As far as I understand, each node in …

Member Avatar for vijayan121
0
158
Member Avatar for sparton
Member Avatar for vijayan121
0
63
Member Avatar for pc0019

Hi! I am using the Boost uBlas interface for matrices and I'd like to be able to create matrices with the following syntax (or similar): [CODE] typedef boost::numeric::ublas::matrix<double> Matrix; //for clarity Matrix mat = {[1,1,1],[2,2,2],[3,3,3]}; [/CODE] The actual matrix should be 3x3 and look like the following - 1,1,1 2,2,2 …

Member Avatar for vijayan121
0
115
Member Avatar for cgcgames

Hi Everyon. Sorry to bother you all again. but I cant seem to figure out a solution for comparing information in these comboBoxes. What I want it to do is take the information the user selects and compare it with another drop down. so lets say one drop down says …

Member Avatar for cgcgames
0
126
Member Avatar for unclepauly

hi, well i have posted this on two other forums without success, hoprfuly you guys can help me ! the scenario - i have a native c++ dll that creates and initializes a string, which is a char array. [CODE] char pRet[1024]; memset(pRet, 0, 1024); strcpy(pRet, "change me!"); [/CODE] the …

0
99
Member Avatar for Ash.22

hi i've to develope c/c++ console application that connects to a MySQL server and lists all hosts connected to it at that point in time. pls help me

Member Avatar for gunavathi
-2
66
Member Avatar for dadam88

If I end my cost of .60 cents with a [B]NICKLE [/B]or a [B]DIME [/B]I get a 2.####.E number. If I end the total cost with a quarter I don't get a big number ( Wrap around number right ? ) Can anyone tell me why? [CODE]#include <cstdlib> #include <iostream> …

Member Avatar for dadam88
0
79
Member Avatar for venkat123

Hi, Can anybody tell me how to access hard disk partition information or MBR content through Visual C++ Programming? Suggest me how should i do programming and which API i should use for this purpose. Bye.....

Member Avatar for xuancong
0
3K
Member Avatar for qqwushi12345

A pair of (positive) integer numbers are called twin primes if they are both prime numbers and the difference between them is 2, i.e. they are consecutive odd numbers and they are prime numbers. (3, 5), (5, 7) and (11, 13) are three examples of such pair of twin prime …

Member Avatar for cgcgames
0
3K
Member Avatar for Allophyl

I have the line [code=c++]#include <algorithm>[/code] at the top of a file, and the line [code=c++]nth_element(minRollArray,minRollArray+n,minRollArray+numSets);[/code] in one of the fuctions in that file. However, when I try to compile it I get the error error C3861: 'nth_element': identifier not found at that line. I would expect this if I …

Member Avatar for Allophyl
0
529
Member Avatar for winecoding

There is a small program. [CODE]#include <stdio.h> void f(char **p); int main() { char *argv[]={"ab", "cd", "ef", "gh"}; f(argv); } void f(char **p) { char *t; t=(p+=sizeof(int))[-1]; printf("%s\n", t); }[/CODE] Assume the size of int is 4, I was asked to give the running result of the following code segment. …

Member Avatar for burgercho
0
90
Member Avatar for nbaztec

Basically, I didn't know where to put this so I choose the Super of the 2 Languages. Our lecturer gave us an assignment to lay out diff. b/w C & C++, which started with a rather dirty spurge of concepts. He stated: In C program , the MAIN() should NOT …

Member Avatar for mrnutty
0
504
Member Avatar for posche

codes for ice cream inventory system using borland c++ or c.. any reply is totally a BIG HELP!please please..

Member Avatar for posche
-3
89
Member Avatar for PixelExchange

Hello everyone. I already know the C code required to use SQL statements within C++. Using mysql_real_connect, I was able to establish a connection to a remote MySQL server. The problem is, even though mysql_real_connect did not RETURN NULL, (meaning that a connection to the mysql server was established) I …

Member Avatar for PixelExchange
0
214
Member Avatar for potato4610

How can I get the respondent to terminate my survey before all respondents have entered? That respondent may enter a specific number of out of range responses in a row. Below is my code: [CODE] #include <iostream> #include <cctype> using namespace std; const int STUDENTS = 10; // students entering …

0
76
Member Avatar for chandini.david

Hey all! Here's my code: mm.cc: [CODE] int compute(int f, int c) { return f + c; } [/CODE] mm.h: [CODE] #ifndef MM_H #define MM_H int compute(int f, int c); #endif [/CODE] main.cc: [CODE] #include <stdio.h> #include "mm.h" int main() { int a; a = compute(10, 4); printf("Output: %d\n", a); …

Member Avatar for chandini.david
0
117

The End.