49,756 Topics
![]() | |
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 … | |
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 … | |
A small game of pong I put together in about half an hour :) Enjoy. | |
[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" … | |
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 … | |
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, … | |
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 … | |
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 … | |
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{} … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Please suggest me from where I can get tutorials for for c++ | |
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 … | |
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 … | |
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 … | |
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 | |
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> … | |
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..... | |
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 … | |
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 … | |
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. … | |
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 … | |
codes for ice cream inventory system using borland c++ or c.. any reply is totally a BIG HELP!please please.. | |
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 … | |
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 … | |
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); … |
The End.