15,300 Posted Topics

Member Avatar for Firestone

>> scanf("%d", av[x]); replace variable x with y. there is no need to pass variables y or z to function avg. Just make them local variable in that function.

Member Avatar for Ancient Dragon
0
109
Member Avatar for The Dude

Q: Why did the man wear his glases to bed at night? A: So he could see his dreams in technicolor :mrgreen:

Member Avatar for blud
0
370
Member Avatar for andyww14

a class can have more than one constructor. write another constructor that takes the parameter you want. [code] class Class1 { public: Class1(); // default constructor Class1(int array[10], int size); }; [/code]

Member Avatar for Mr Violent
0
106
Member Avatar for jbennet

I still have VC 1.52C -- the last MS-DOS compiler. And it still works, if you want to write 16-bit console programs. It doesn't really matter how old your compiler is if it does what you want it to do. But don't assume you can learn to write good c++ …

Member Avatar for jbennet
0
169
Member Avatar for WhiteAvenger

I don't reall know pascal, but most languages are pretty much the same. You can do it one of two ways: 1. read the file one character at a time and write the character just read to another file. When a space is read replace it with a tab and …

Member Avatar for WhiteAvenger
0
137
Member Avatar for AnG'

>>#include <iostream.h> that file is obsolete, unless you are using a realy old compiler such as Turbo C++ [code] #include <stream> using std::cout; using std::endl; using std::cin; [/code] >>39 C:\Dev-Cpp\Statics Project.cpp name lookup of `i' changed for new ISO `for' scoping i declared in the for loop only has scope …

Member Avatar for Ancient Dragon
0
159
Member Avatar for vanduea

how about a program like what you see in resturants to calculate the customer's bill. Has a menu of food items, you select the items you want and it calculates the total, tax and tip. It could also keep track of hourly, daily, weekly and monthly totals -- total sales …

Member Avatar for Ancient Dragon
0
106
Member Avatar for dmmckelv

>> i think the the Include should be: >> #include <string.h> string.h is used in C programs. C++ should use cstring as the OP posted. He did it correctly.

Member Avatar for ~s.o.s~
0
261
Member Avatar for dmmckelv

>>cin >> sentence; there is nothing wrong with that while loop. The problem is the line above -- the extraction operator >> stops at the first space. use getline() instead.

Member Avatar for Ancient Dragon
0
114
Member Avatar for JRM

maybe using an uninitialized pointer ? Can't say for sure until you post some code.

Member Avatar for Ancient Dragon
0
74
Member Avatar for Acquire

>> status = fgets(list, 80, inp); fgets() does not return an integer -- it returns char*. And your loop is incorrect [code] while(fgets(list, 80, inp) != NULL); { // blabla }; [/code] >> fscanf(inp, "%d", &seconds); fscanf() is the wrong function because it redads from a file not from memory. …

Member Avatar for majicbeans
0
241
Member Avatar for majicbeans

Is there a question somewhere ? Or do you just like to post code?

Member Avatar for majicbeans
0
129
Member Avatar for balgarath

do it just like you would from the command line. [code] system("dir > myfile.txt"); [/code]

Member Avatar for balgarath
0
164
Member Avatar for balgarath

>>Yeah I'm using c style strings in c++ code get over it that is ok if you have not yet learned about std::string or your instructor requires character arrays. The function causes buss error probably because it does not return the stream. Your compiler should have given you either an …

Member Avatar for balgarath
0
98
Member Avatar for gmpjames

If you want someone to review your website, please post your request [URL="http://web.daniweb.com/techtalkforums/forum55.html"]here[/URL].

Member Avatar for Ancient Dragon
0
39
Member Avatar for boujibabe

open the log file for append mode, not write mode, if you want just one log file that contains info for all files fopen(filename,"a"); or create a unique log file name if you want results in separate log files.

Member Avatar for boujibabe
0
330
Member Avatar for rbinc

It is continuing like that because cin is trying to convert the alpha character that is in the keyboard buffer to numeric, but it fails and leaves the key in the keyboard buffer. The easiest way to correct this is to get the integer as a string the convert the …

Member Avatar for Lerner
0
221
Member Avatar for Gunner54
Member Avatar for joelw

those functions sort double arrays, not int arrays. Either change your int arrays to double, or change the functions to sort int arrays. The two can not be mixed. >>double sortArray(double [], int); this is the wrong prototype. Actual function does not have those parameters.

Member Avatar for joelw
0
120
Member Avatar for pugg09

variable [b]size1[/b] must be set to the length of the input buffer, 1024 in your example. you might also initialize rgValue to 0 [code] char rgValue [1024] = {0}; [/code]

Member Avatar for pugg09
0
119
Member Avatar for centos123

there are a couple ways to approach the problem. (1) read the file twice. The first time through determine the number of columns in the 2d array from the "heading" line and the number of rows from the "value" line. Just keep track of the largest row and the largest …

Member Avatar for centos123
0
197
Member Avatar for mattyd

I hate snow -- don't like shoveling the stuff or driving in the stuff. It would not be so bad if the snow fell everywhere except on sidewalks and roads. So I moved south the St Louis missouri a few years ago where the winters are normally pretty mild. We …

Member Avatar for jwenting
0
120
Member Avatar for jbennet

[QUOTE=niek_e;276823]Send me a link and I'll see what I can do p.s. You could download VS2005 pro yourself from microsoft.com, it's a 90 day trail[/QUOTE] The free express edition will not compile for wireless smart devices.

Member Avatar for Ancient Dragon
0
103
Member Avatar for hoosier23

given the example in [URL="http://www.nist.gov/dads/HTML/adjacencyListRep.html"]this[/URL] article and and the example you posted, where "->" represents a linked list, you would have a 2d linked list that looks like below ? 0->2->4 1->3->4 2->5 3->6 6->0 The first number in the pair is the row number, and the second number is …

Member Avatar for hoosier23
0
353
Member Avatar for hkBattousai

did you read [URL="http://msdn.microsoft.com/workshop/browser/webbrowser/browser_control_ovw_entry.asp"]this[/URL] tutorial

Member Avatar for Ancient Dragon
0
71
Member Avatar for batista06

pick any number and calculate it with pencil & paper. For example use 6 and 2. 6/2 = 3; --> (num/den) 3 * 2 = 6 --> ((num/den) * den) rem = 6 - 6 == 0 --> rem = num - ((num/den)*den); so 6 is a perfect number. now …

Member Avatar for DavidRyan
0
116
Member Avatar for matrimforever

>>provide the following member functions in your class: does your class contain all 9 required methods ? If not then you need to code them as described in the program requirements. Just start with #1 and code each one in order. You should also test each method after coding it …

Member Avatar for Ancient Dragon
0
109
Member Avatar for Harshita_garg

The destructor is not deallocating enough memory -- it heas a memory leak. For every new[] there must be a corresponding delete[]. You need to add a loop similar to the one that is in the constructor. As for your problem -- hummm I'll have to think about it awhile. …

Member Avatar for Harshita_garg
0
144
Member Avatar for matrimforever

use getline when the file name may or may not contain spaces. [code] int readData() { std::string filename; cout << "Please enter in the path to the student score file: " << endl; getline(cin,filename); ifstream theFile(filename.c_str()); } [/code]

Member Avatar for Ancient Dragon
0
85
Member Avatar for Ancient Dragon

what is it supposed to do? I pressed it and it seems to do nothing except highlight the button.

Member Avatar for ~s.o.s~
0
432
Member Avatar for angel_e1205

I suspect the problem is in the PHP code -- I don't know the first thing about PHP. But in C or C++ passing arrays is very common thing to do. Does php duplicate the array before passing it to c/c++ then toss it into the bit bucket after the …

Member Avatar for iamthwee
0
120
Member Avatar for mcosciel

I think free [URL="http://www.crimsoneditor.com/"]Crimson editor [/URL]will colorize that FORTRAN code. But its only an IDE and not a compiler. You need to get a fortran compiler if you want to compile your programs into an executable file. But [URL="http://www.pgroup.com/gindex.htm"]here[/URL] is a plugin for Visual Studio 2005.

Member Avatar for Ancient Dragon
0
92
Member Avatar for spacecowboy123

since you did not post the exact code I dobt anyone can help you. I hope that is not really the way you declared class H. :eek:

Member Avatar for Ancient Dragon
0
123
Member Avatar for Shiva_nan

[QUOTE=Shiva_nan;276453]Is it possible to create reports using Dev C++?.. [/QUOTE] [URL="http://www.businessobjects.com/products/reporting/crystalreports/default.asp"]Here[/URL] you go.

Member Avatar for Ancient Dragon
0
92
Member Avatar for steveneven
Member Avatar for gemacjr

This question was already answered on [URL="http://www.programmersheaven.com/c/MsgBoard/read.asp?Board=3&MsgID=348929&Setting=A9999F0001"]another board[/URL]

Member Avatar for Ancient Dragon
0
89
Member Avatar for Sin-da-cat
Member Avatar for batista06

did you enter a number as argument to the program? Such as: c:>myprog 15 <Enter> [edit]sorry ~s.o.s.~ for duplicating your answer.[/edit]

Member Avatar for batista06
0
105
Member Avatar for Prahaai

you will need a second char array. copy the first 43 characters to this second char array array then print it. then print the remainder of the original array.

Member Avatar for Prahaai
0
91
Member Avatar for s88

>> return a[count]; the above is inside the loop, so the loop only runs once.

Member Avatar for nicentral
0
88
Member Avatar for dev.cplusplus

>>Release MinDependecy this means the compiler will use as many static libraries as possible when linking your program -- the program will make minimal use of DLLs. This makes it easy for you to run the program on other computers that may not have all the DLLs that the program …

Member Avatar for Ancient Dragon
0
100
Member Avatar for siddhiinfomedia

compile your program for debug then when the core file is created use debugger on it to see where the problem is. Suggestion: your program makes no input validations. How does it know that argv[1] contains an integer between 0 and 20? what happens if I enter 500 as argv[1] …

Member Avatar for Ancient Dragon
0
115
Member Avatar for kaka_shi

If I remember my calculas correctly (mind you its been over 35 years), problem 1 is asking you to calculate the sum of all the numbers between 0 and some maximum value, that you will probably enter from the keyboard. If that is true, your program will need an integer …

Member Avatar for Ancient Dragon
0
160
Member Avatar for atrusmre

Check out [URL="http://www.codeproject.com/staticctrl/CFontStatic.asp"]this[/URL] MFC control:)

Member Avatar for Ancient Dragon
0
105
Member Avatar for Luckychap

>>Now, for a member function to be virtual in a class, both the base class AND derived class must be able to be instantiated Not really. The base class can have pure virtual functions which means it can not be instantiated on its own. The derived class(s) must override pure …

Member Avatar for Ancient Dragon
0
140
Member Avatar for killaruna

you can't do that with any programming language. The best you can hope for is for a disassembler to produce assembly language.

Member Avatar for MattEvans
0
115
Member Avatar for Luwigie

The link error is telling you that you forgot to code the function getData(). This is not a standard C function -- you have to write it yourself.

Member Avatar for Luwigie
0
170
Member Avatar for The Dude
Member Avatar for webspy

this is obviously a c++ program so why don't you use a c++ container such as <map> to house the plugins? Other than that, its hard to say what your problem is because you did not post enough code. It would be helpful if you just zipped up all the …

Member Avatar for webspy
0
156
Member Avatar for earlyriser

[code] for(y = 0; y < 80; y++) //#of employees could reach 80 { for(x =0; x <30; x++)//30 is a max length for names { fichier.getline (Noms[x], 50, ':'); [/code] 1. If 30 is the max length for names, why is getline() reading 50 characters? 2. The [b]for( x …

Member Avatar for earlyriser
0
202

The End.