15,300 Posted Topics

Member Avatar for arjun.godara.549
Re: c++

We are not going to do your homework for you because that will teach you nothing. Give it a try, post the code you have written, then ask specific questions about what you don't understand.

Member Avatar for Ancient Dragon
0
81
Member Avatar for Gebby

> apart from seeing technical words I do not understand, What didn't you understand?

Member Avatar for Ancient Dragon
0
443
Member Avatar for Van_1

There probably isn't anything you can do about it, you are attempting to run a program compiled with a 30-year-old compiler for MS-DOS 6.x and Win95 in a modern operating system. DOSBox tries it's best to be compatible, but is not the same as the original MS-DOS. If you can, …

Member Avatar for N1GHTS
0
407
Member Avatar for Ancient Dragon

After changing my password I clicked the Edit Curriculum Vitae link and got the error "Oops! We don't know who you are ...". I clicked the back button and it returned me to my profile page. Apparently either one of two things happened: (1) after changing my password I was …

Member Avatar for Dani
0
180
Member Avatar for sumdumhoe

[Here](http://bytes.com/topic/c/answers/218908-why-stdprn-not-defined-under-windows)'s a thread on the same topic. You can open a printer port by opening "lpt1:", but that assumes the printer is attached to the LPT1 port on the computer. Most modern computers today don't have such a port, printers are attached either by USB or wifi. In that case …

Member Avatar for Ancient Dragon
0
200
Member Avatar for Sanjeetjmp

Microsoft IDE can generate some pretty huge inline functions which consume a lot of stack space.

Member Avatar for Ancient Dragon
0
219
Member Avatar for tessa.burkhalterblackmon

Compare the parameter list of the function on line 18 with what you are trying to do on line 107. The number of parameters on line 107 must be the same as on line 18, and of the same data types. line 18: why is totalFine a parameter to the …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for javed.iqbal.3979

Get [MySQl++ class library](http://live.dadanini.at:8980/mysql/downloads_html/api-mysql++.html).

Member Avatar for Ancient Dragon
0
163
Member Avatar for asmaa_4
Member Avatar for yasir prince
0
114
Member Avatar for kent.johnstone_1

SOCKET shold be an int, not char because it's value can be a lot larger than what an char can hold. The file that contains SOCKET declaration is probably not reachable to the \*.c file or there could be an #ifdef around it.

Member Avatar for kent.johnstone_1
0
330
Member Avatar for nhrnjic6

The function doesn't make much sense. For example, line 15 is unreachable, If line 5 is false then the only other option is for line 8 to be true. This is a simplified version of your function int find_index(int num,int Niz[],int index){ if(num == Niz[index]) return index; find_index(num,Niz,index++); return -1; …

Member Avatar for Ancient Dragon
0
124
Member Avatar for Reverend Jim
Member Avatar for sardarnouman.tariq

Try attending all the classes, reading your text book and doing all the exercises in your book. Then you can post specific questions here at DaniWeb along with the code you are trying to write.

Member Avatar for Ancient Dragon
0
72
Member Avatar for mexabet
Member Avatar for mexabet
0
308
Member Avatar for Adox

Open the file in append mode the write a line to it. The os will put the new line after the last line of the file. See the a+ flag [here](http://www.cplusplus.com/reference/cstdio/fopen/).

Member Avatar for Ancient Dragon
0
50
Member Avatar for hariza

c or c++? read all the words into an array of strings then use either C's qsort() function or c++ sort(). If you are required to write your own sort routine then you can't use either of those functions. in that case, google for "sort algorithms" and you will find …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for hail2dthief

Read the previous post -- some of the colors are already in that post and they are all defined in windows.h. Console programs have very limited colors, the same as old MS-DOS 6.X from 30 years ago.

Member Avatar for Ancient Dragon
0
23K
Member Avatar for 0914541592

This question has been asked and answered over a million times. Why don't you just use google to get your homework done.

Member Avatar for humorousone
0
323
Member Avatar for NardCake

Since it's text mode and not GUI a better looking progress bar is probably not possible.

Member Avatar for L7Sqr
1
196
Member Avatar for hatre
Member Avatar for Ancient Dragon
0
79
Member Avatar for Gamex

c++ is probably the most used by good game developers, but it's not the easiest. IMO the easiest would be VB.NET because it's graphics are much easier than other languages. I'm not a game programmer, but if I were I'd spend a lot of time [here](http://www.gamedev.net/forum/11-game-programming/) and on google. >where …

Member Avatar for DeanMSands3
0
163
Member Avatar for chubbyy.putto

you didn't post the loop, but you need to declare a counter before the loop starts then increment it every time a positive integer is encountered inside the loop. Only after the loop finishes should you display the final count.

Member Avatar for Ancient Dragon
0
175
Member Avatar for javed.iqbal.3979

When the file fails to open it means one of two things: (1) you mispelled the name of the file, or (2) the file isn't in the same folder as where the program is running. Questiion 1: Write the data out in a different format. write() just writes out the …

Member Avatar for NathanOliver
0
156
Member Avatar for javed.iqbal.3979

Because after you enter a number from the keyboard you have to press the <Return> or <Enter> key. That key, '\n' remains in the kayboard buffer until the next input is made. In the case of another number, cin skips all leading whitespace characters (space, newline, tab, and backspace) then …

Member Avatar for Ancient Dragon
0
196
Member Avatar for haider885
Member Avatar for haider885
0
116
Member Avatar for Felix Arba

To do it in either C or C++ you need to read some tutorials about socket programming. There is a difference between MS-Windows and \*nix sockets, so you first have to determine which platform you are writing for. [Here](https://www.google.com/#q=c%2B%2B+socket+tutorial) are some google links that you might find helpful.

Member Avatar for Felix Arba
0
180
Member Avatar for rowen_1

short and long are two of the numeric data types (char, short, int, long, float and double). Only char has a guarenteed size, which is 1 byte with a range of -127 to 126. The size of all the others is compiler-dependent, so you have to look in the compiler's …

Member Avatar for deceptikon
0
176
Member Avatar for Neelam_1
Member Avatar for triumphost

I usually use the macros in tchar.h to make programs UNICODE friendly. If you search MSDN for the string function it will tell you what macro to use from tchar.h. For example, [strcmp() becomes _tcscmp()](http://msdn.microsoft.com/en-us/library/e0z9k731.aspx), and for string literals use the _TEXT macro, such as `_TEXT("Hello World");` There are no …

Member Avatar for Ancient Dragon
0
273
Member Avatar for kbear23

Try this: Your function is exiting the loop after the first iteration whether the username and password are found or not. int POSConsole::Authenticate(string _userID, string _password) { bool failedLogin=false; int returnValue=0; _password = Encrypt (_password); //Encrypt user enter password to compare with vector for (int index = 0; index < …

Member Avatar for Ancient Dragon
0
247
Member Avatar for 2concussions
Member Avatar for rubberman
0
273
Member Avatar for mohamed.talaat.1217

You need to post a couple lines from the file so we can see how it is formatted. But generally you would want to read each field into it's appropriate structure element. The easiest way to do it is calling fscanf() instead of reading the file one character at a …

Member Avatar for mohamed.talaat.1217
0
295
Member Avatar for nhrnjic6

The while loop beginning on line 28 needs brackets { and } because there are more than one statement within the loop You don't need the if statement on line 26, so you can just delete that line. while(konduktor->p_next_num !=0) { cout << konduktor->num; konduktor = konduktor->p_next_num; } Now, to …

Member Avatar for AndrisP
0
169
Member Avatar for Bilal gulbaz

This is C# forum, not java. For java questions post in the java forum. And ... do not hijack someone else's thread to ask your question but start your own thread.

Member Avatar for Ancient Dragon
0
122
Member Avatar for raliot
Member Avatar for cherrymae.calma
0
330
Member Avatar for Shahbaz_2

I have both windows 8.1 and windows 7 on the same homegroup network and they each share printers and folders with each other. Most are wired, but one is wifi.

Member Avatar for Ancient Dragon
0
121
Member Avatar for thomas_14

It looks like main() is calling the wrong function. insertIntoTable() instead of insertValuel() IMO insertValue() is too complicated, paramitizing the sql like that is not necessary. sprintf(sql,"INSERT INTO table(id,text) VALUES(%d,\"%s\")",1,randomText.c_str()); Now with that simple line call sqlite3_exec(), as shown in [this 5-minute tutorial](http://www.sqlite.org/quickstart.html).

Member Avatar for thomas_14
0
325
Member Avatar for suela
Member Avatar for Ancient Dragon
0
178
Member Avatar for nhrnjic6

the value of SIzE is 4, the initial value of counter is 0. So SIZE never equals (counter+1). The value of counter never changes inside the loop. >how is the right way to do it? Increment counter somewhere inside the loop but outside the if statement, most likely place is …

Member Avatar for nhrnjic6
0
128
Member Avatar for np complete

How do you expect the thread to wait until it does something? You can't have it both ways. What's supposed to happen when GetClipboardData() returns NULL? You need to put a Sleep() in that loop so that other processes and threads get CPU time.

Member Avatar for Ancient Dragon
0
313
Member Avatar for vishalonne

In a M by N array, where M is the number of rows and N is the number of columns, the array has these coordinates Upper left: 0,0 Lower left: (M-1),0 Upper Right: 0,(N-1) Lower Right: (M-1),(N-1) The way I understand your assignment is to find the sum of those …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for nhrnjic6
Member Avatar for haider885
Member Avatar for moozyedogawa

Don't understand the problem. Do you just want to copy some bytes from the data file to a bin file? The terms "data file" and "bin file" are rather ambibuous, they are both really the same thing.

Member Avatar for moozyedogawa
0
349
Member Avatar for clife
Member Avatar for Elvi

Do you mean the sum of each column? You will need two loops to do that, the outer loops counts N columns and the inner loop counts M rows. It's almost identical to the way you would do it on paper or in an Excel spreadsheet.

Member Avatar for Ancient Dragon
0
138
Member Avatar for dhatsah
Member Avatar for Lucaci Andrew

Isn't that how it's supposed to work? When scrolling through a thread only the <DANIWEB> link and search bar are fixed. The other lines are also fixed when scrolling through menus.

Member Avatar for Dani
0
581
Member Avatar for zaxo311

There are many ways to accomplish it. You could add a small item at the beginning of each line that identifies it as either client or item. fprintf(f,"Client: %s %s\n",head->client_name,head->client_last_name); fprintf(f,"Item: %s %s %f %s %f ",CurrentItem->item_name,CurrentItem->item_state,CurrentItem->item_price,CurrentItem->item_status,CurrentItem->item_price_if_not);

Member Avatar for zaxo311
0
9K
Member Avatar for daino

You can usually find online help with most c++ functions and classes by googlein for them. In this case, google for "c++ std::string" and [this ](http://www.cplusplus.com/reference/string/string/)will be the first hit you see. Once there, click the link [(constructor)](http://www.cplusplus.com/reference/string/string/string/) Next, look down the page at Parameters and you will find this …

Member Avatar for daino
0
365

The End.