1,358 Posted Topics

Member Avatar for brain007

It's barely been 10-mins. You can't expect immediate answers. [URL="http://www.daniweb.com/forums/thread279441.html"]Especially when you triple post.[/URL] Good Luck.

Member Avatar for Sodabread
0
2K
Member Avatar for saura

This probably should be a new thread, but... Your linker either can't find the file or the file is damaged. Did you copy the file "appio.lib" to your program's "release" folder? Are you sure you entered the path to the file correctly? If the file is damaged, you'll have to …

Member Avatar for saura
-1
1K
Member Avatar for Justin9825

After the input on Line 49 there is still a newline character ('\n') that is lingering in the input stream. When you get to the next input (on Line 80), an invalid input type is detected which causes your input stream to get corrupted. You need to extract this before …

Member Avatar for Salem
0
126
Member Avatar for mebob

Does it stop once i=12 or after it displays the 12? Your statement isn't very clear... If it shows the 12 then stops, that is normal behavior for the for loop as you have written it. This is why mitrmkar suggested you use const values for your array sizes. That …

Member Avatar for mebob
0
161
Member Avatar for crss

[URL="http://www.daniweb.com/forums/announcement8-3.html"]*kicks ass*[/URL] You should have started this long ago.

Member Avatar for Fbody
0
258
Member Avatar for 3cats

You can not compare more than 1 value in a particular comparison statement. You use the logical operators to combine multiple comparisons to produce a net result. [U]not legal:[/U] [INDENT]if (aValue == 1 || 2) if (1 < aValue < 4)[/INDENT] [U]legal:[/U] [INDENT]if (aValue == 1 || aValue == 2) …

Member Avatar for Salem
0
3K
Member Avatar for caro88

[URL="http://www.w3schools.com/ajax/default.asp"]AJAX. Have the button activate a JavaScript function that connects to PHP to access the database.[/URL]

Member Avatar for caro88
0
160
Member Avatar for gagansaini599

[URL="http://www.daniweb.com/forums/announcement118-2.html"]You obviously either don't know what rules are or don't know how to read.[/URL] Even if I did know how to help you, I'd be inclined not to.

Member Avatar for Fbody
0
119
Member Avatar for d34dw4rd

You have 2 options: 1. Sort the array, then search. If done properly, the numbers you're looking for will be directly adjacent to the target. 2. Use 2 double tests to check if a value falls within an ever-changing range of values. [CODE]if (nextLow < input && input < target) …

Member Avatar for abhimanipal
0
133
Member Avatar for ahmed hefnawy

"It doesn't work" isn't going to cut it. Give us some specifics. Also, [use code tags](http://www.daniweb.com/forums/announcement8-3.html)

Member Avatar for abhimanipal
0
203
Member Avatar for code zombie

[QUOTE]Can anyone tell me what I am doing wrong, I am trying to use the push_back function thanks.[/QUOTE] Not without seeing the relevant portion of your code...

Member Avatar for code zombie
0
143
Member Avatar for mtech91

Even though you technically can, NEVER call main(), it is not intended to be a recursive function. A loop, specifically a while loop in this case, is the correct way to do it. The issue is that his conditional is not written correctly, as WaltP pointed out.

Member Avatar for Fbody
0
260
Member Avatar for nuB

[QUOTE](gameBoard[rows][cols] == [rows-1][cols+1] )[/QUOTE] Not real sure what you are trying to accomplish here. I think you probably meant [iCODE](gameBoard[rows][cols] == gameBoard[rows-1][cols+1] )[/iCODE]. You have this same basic error for every comparison in your fiveInArow::diagonalRightWin() function. At first glance, I'm pretty sure you've replicated it in your other "Win" functions …

Member Avatar for nuB
1
391
Member Avatar for teomurgi

It will depend on 1. how you created the vector<Object *> and 2. how and when you created the individual <Object>s. 1. Is foo dynamically allocated, or did you create a vector<Object *>, then assign the vector's reference to foo? If foo was not dynamically allocated, I don't believe delete …

Member Avatar for Fbody
0
187
Member Avatar for Joonhwa Yang

When you are passing an array, you only use the name of the array, you do not use the braces. If you use braces, the compiler thinks you are trying to pass a specific element. This causes 2 errors: 1. you haven't identified the specific element you want 2. you …

Member Avatar for Fbody
0
288
Member Avatar for summey

Look at Lines 45 and 49. What's missing...? Hint: You have 4 function calls crammed into 2 lines. You need to add 4 pairs of 2 characters. Also, line 45 isn't doing what you think it is. You should reconsider the operators you are using there. While you're at it, …

Member Avatar for summey
0
425
Member Avatar for alexgv14

Perform a query. As you loop through the return append each return record to the array. That should be all it takes. Although, from a design standpoint, I'm not too sure this is a good idea. It has the potential to be a HUGE security risk. If a malicious user …

Member Avatar for rajarajan2017
0
68
Member Avatar for mariosbikos

To pass an array, you must specify your parameter as an array. [CODE]void aFunction(int anArray[][dim2Size]); //prototype void aFunction(int anArray[][dim2Size]) { //function header for (int dim1 = 0; dim1 < dim1Size; ++dim1) { for (int dim2 = 0; dim2 < dim2Size; ++dim2) { printf("Value in anArray[%d][%d] = %d \n", dim1, dim2, …

Member Avatar for mariosbikos
0
269
Member Avatar for Xufyan

It's exactly the same logic as finding the max. You basically just start with a "high" value (rather than a "low" value) and reverse your comparison. Store the first element of the array directly to the "min" variable, don't bother with min=0 because that can skew your results. Once you …

Member Avatar for jephthah
0
140
Member Avatar for moods125

[QUOTE=moods125;1196824] <snip> here is my code...i have some errors and cant seem to fix them...can someone help me[/QUOTE] That doesn't give us much to go on. You want specific, targeted help, give us specific, targeted information.... I'm [B]guessing[/B] your errors are related to the way you set up truck's inheritance …

Member Avatar for Fbody
0
103
Member Avatar for Annettest

It is legal, as long as the expression evaluates to a value within the acceptable range of indexes. The range of i is zero (0) thru (rows^2)-1. When you multiply i by rows, you dramatically increase its value to a point where it is outside the limits of the vector. …

Member Avatar for Annettest
0
294
Member Avatar for bperiod

Dev-C++ comes with the MinGW compiler, but it's probably an old version. The Code::Blocks version is most likely newer. You'll have to mark the thread "solved" yourself. There should be a "mark as solved" button at the bottom of the listing, next to the "Reply to this Thread" button.

Member Avatar for Fbody
0
830
Member Avatar for letmec

This thread is almost 5-years old. Considering the OP's post count, they've probably long since moved on. Just look at [URL="http://www.daniweb.com/forums/post127235.html#post127235"]typek's links[/URL] and be done with it. If they don't help, start a new thread.

Member Avatar for Fbody
0
399
Member Avatar for pok.kys90

This isn't a snippet, it's a homework assignment. How do you think DeleteRecord() should work?

Member Avatar for pok.kys90
0
206
Member Avatar for pichi89

It looks good conceptually, but I'm a little concerned about the structure of that for loop. It overruns the boundaries of the original array. I think you should probably use the first for loop to copy the data, then use a second for loop to finish initializing the rest of …

Member Avatar for Fbody
0
94
Member Avatar for yznk

Well, I'm not sure about how all the stuff you have crammed into that line works, but I do know that you are trying to call setdepend() with only 1 argument and it requires 2. What did you forget to send to it? [edit] wait... nvm.... You have 2 functions …

Member Avatar for Fbody
0
1K
Member Avatar for sledge4

You really can't output in that format directly without a lot of DOM commands. (Don't ask me about them, I won't be able to help.) What you may want to do is find a sensible way to temporarily store the data within your script as you read it from the …

Member Avatar for Fbody
0
95
Member Avatar for dragontruong

[QUOTE]Holding.h:[B]15[/B]: warning: `class Holding' has virtual functions but non-virtual destructor In file included from p6.cpp:[B]12[/B]: Recording.h:[B]13[/B]: warning: `class Book::Recording' has virtual functions but non-virtual destructor p6.cpp:[B]90[/B]: error: expected `}' at end of input Book.h:[B]14[/B]: warning: `class Book' has virtual functions but non-virtual destructor[/QUOTE] The numbers that I have bolded are …

Member Avatar for mitrmkar
0
159
Member Avatar for zemly

[I suggest you read up on code-tags, rinku.](http://www.daniweb.com/forums/announcement8-3.html)

Member Avatar for jwenting
-2
107
Member Avatar for timbomo

[CODE] ifstream in_stream2; // reads pricelist.txt in_stream2.open(" PRICELIST.txt",ios::in);[/CODE] Do those filenames match? Nope..... You have an extra 'space' at the beginning of the filename and you have it in all caps. Delete the space and convert the name to lowercase. [CODE]ifstream in_stream4;// read recipt.txt in_stream4.open("proff.txt", ios::in);[/CODE] These names don't match …

Member Avatar for timbomo
0
122
Member Avatar for xcarbonx

You have been around long enough, you should know how code tags work. I suggest you fix your tag while you still can. MrJNV already covered your name read issue. The space in the grades line shouldn't be an issue. In fact, it's beneficial. All you have to do is …

Member Avatar for xcarbonx
0
128
Member Avatar for deeep

Get rid of the shifts, you don't need them since you are using a bit field and are assigning directly to the various bits. Then, change your current assignments: [CODE]complete_buff->buf1=(unsigned char)0x01;; complete_buff->buf2=(unsigned char)0X00; complete_buff->buff3=(unsigned char)0x01; complete_buff->buff4=(unsigned char)0x01; complete_buff->buff5=(unsigned char)0x00; complete_buff->buff6=(unsigned char)0x00; complete_buff->buff7=(unsigned char)0x00; complete_buff->buff8=(unsigned char)0x00;[/CODE] To this: [CODE]complete_buff.buf1=(unsigned char)0x01;; complete_buff.buf2=(unsigned …

Member Avatar for jephthah
0
171
Member Avatar for gregarion

Try using "endl" instead of '\n'. Also, consider getting rid of the "g" variable, all it really does is take up memory and require extra steps. [CODE]int main() { ofstream myfile("report.txt"); int billy [] = {16, 2, 77, 40, 12071}; for (int n=0 ; n<5 ; n++ ) { myfile …

Member Avatar for Fbody
0
109
Member Avatar for samoz83

You would have to read them in to properly position the read pointer for the next read. Once they are read, simply ignore them and move on to the next read. To put the values in an array, put the read process in a loop and use an index variable …

Member Avatar for Fbody
0
86
Member Avatar for FlynnLags

Either you have a multiple inclusion, or you duplicated your declaration statement somewhere, or your function call isn't formatted correctly. You'll have to post more of your code to tell though, there's just not enough here.

Member Avatar for Fbody
0
803
Member Avatar for gufur

In addition to the syntax error mentioned by mitrmkar, your posted code and your posted output do not match. Which one is correct? I have Win 7 Pro (32-bit) and I use cin all the time with no issues at all (outside the normal lingering characters issue inherrent in the …

Member Avatar for gufur
0
402
Member Avatar for Hatem Faheem

[QUOTE=firstPerson;1193787]what you are looking for are more along the lines of this : [code] void populateUniqueRandom(int Array[], const int size, int start, int end){ assert(end-start == size); //make sure the size the correct size for(int i = 0; i < size; ++i){ Array[i] = end - start + i; } …

Member Avatar for VernonDozier
0
116
Member Avatar for r5berndt

Your call appears to be formatted incorrectly, but I can't tell if that's the only issue. [URL="http://www.daniweb.com/forums/announcement8-3.html"]I suggest you read this first.[/URL] [URL="http://www.gidnetwork.com/b-38.html"]As well as this.[/URL] [edit] oops..... a mod (Nick Evan) beat me to it....

Member Avatar for Fbody
0
103
Member Avatar for rajesh.c

The extra char is probably the null terminator. Have your loop check for '\0' and terminate without processing when it's detected.

Member Avatar for Fbody
0
112
Member Avatar for MrJNV

Not real sure what a "Projection" operator is, but your "Selection" operators are the "dot" and "arrow" operators ('.' and '->' respectively). They are used to access the elements of an object. An example class: [CODE] class example { public: example(int newInt = 0) : aPublicInt(newInt) {} //default constructor int …

Member Avatar for MrJNV
0
276
Member Avatar for dualdigger

[QUOTE=dualdigger;1190468]My problem is not random no generation rather I need to select 30 random records from query table out of 300 records. At the moment, if my player selects 30 questions options, he gets only the first 30 questions from collection of 300 records, I want this selection to be …

Member Avatar for dualdigger
0
147
Member Avatar for modesto916

[First, read the announcement about code tags](http://www.daniweb.com/forums/announcement8-3.html) [Second, read this functions tutorial](http://www.cplusplus.com/doc/tutorial/functions/) [Third, read this classes tutorial (closely)](http://www.cplusplus.com/doc/tutorial/classes/) Finally, add the proper return types to your member method implementations in the echoit.cpp file.

Member Avatar for modesto916
0
172
Member Avatar for vivosmith

> start quote: #include (iostream.hpp) class Stocks { public: Stocks( int price); ~Stocks(); int get_price() const {return pps;} int set_price() const {pps;} int the_price_is (int pps); int pps; } int main() { Stocks AMX (35) cout << " Hello, please enter a symbol.\n"; if cin>> AMX; cin.ignore; cin.get; AMX.the_price_is cout<<" …

Member Avatar for Fbody
0
118
Member Avatar for Nicko_FaTe_

How would you write it in C++? Pseudocode is very freeform, just describe how you would do it in C++. Just don't make it the formal C++ syntax.

Member Avatar for WaltP
0
81
Member Avatar for kevin0101

Approach what exactly? You just barfed out a bunch of code (that's probably not even yours) and yelled "HELP!" [URL="http://www.daniweb.com/forums/thread78223.html"]Have you read any of the posting guidelines?[/URL] We have absolutely no information to even begin to know how to help. [URL="http://www.daniweb.com/forums/announcement8-2.html"]Is this homework? Have you thought about it at all?[/URL] …

Member Avatar for Fbody
-1
168
Member Avatar for Wert1

[CODE]int arrayLength = 0; int time[arrayLength]; [/CODE] Is that even legal? Can you have a zero-length array? I know some compilers are starting to allow the use of a non-const variable to determine an array's size, but mine doesn't. When I try to compile your original code, other than the …

Member Avatar for mitrmkar
0
345
Member Avatar for fyp

http://www.daniweb.com/forums/announcement8-3.html You've been around long enough to know how to use code tags. Don't count on much help until you use them properly.

Member Avatar for Ancient Dragon
-1
173
Member Avatar for JGClifton

It is possible, but there is not enough info here. How are you generating the URL? What are these values for? Where in the URL did you want to put them? [URL="http://www.daniweb.com/forums/announcement8-2.html"]Most importantly, what have you tried so far?[/URL]

Member Avatar for Fbody
0
159
Member Avatar for c++ student

LOL, [URL="http://www.daniweb.com/forums/announcement8-2.html"]"givemetehcodez" type posts don't fly around here.[/URL]

Member Avatar for Fbody
-3
104
Member Avatar for Obsidian_496

I don't think you can force input to be a digit. Look up the [URL="http://www.cplusplus.com/reference/iostream/ios/good/"]good()[/URL] and [URL="http://www.cplusplus.com/reference/iostream/istream/ignore/"]ignore()[/URL] stream member functions. Then, once you are familiar with them, modify your validation loop.

Member Avatar for Fbody
0
183

The End.