15,300 Posted Topics

Member Avatar for Qonquest

How to use fgetc() to read the file one charactger at a time. Note that chrLetter should be int not char because fgetc() returns int. int chrLetter; while( (chrLetter = fgetc( pfilInput ) != EOF) { strBuffer[Index++] = chrLetter; } If you are not required to use fgetc() then I'd …

Member Avatar for WaltP
0
181
Member Avatar for Ian Woodgate

Your program looks nice but your use of boost library is probably not allowed in his program. It's like hitting a nail with a sludge hammer, way too overkill.

Member Avatar for profyou
0
136
Member Avatar for Dani

> Do you guys miss having views? No. I can live quite nicely without them.

Member Avatar for gerbil
0
206
Member Avatar for gerbil

I've also noticed that every since Dani upgraded to the new forums. There were a lot of threads that indicated Dani was the last poster, but if you go to the last post in the thread she is not there.

Member Avatar for deceptikon
0
137
Member Avatar for daino

maybe you should ask that question in the [Acrobat SDK forums?](http://forums.adobe.com/community/acrobat/acrobat_sdk?view=discussions)

Member Avatar for daino
0
305
Member Avatar for Perry31

> As for int 3, forget it. Yes, because the operating system won't let your program execute interrupts. The processors on Intel based computers do not allow normal programs to use int instructions. [Here](http://faydoc.tripod.com/cpu/int3.htm) is more info about int 3 if you are really interested.

Member Avatar for Ancient Dragon
0
339
Member Avatar for lakshman3

pass them just like you would any other variable void foo(int matrix[][5]) { } int main { int matrix[10][5]; foo(matrix); }

Member Avatar for Ancient Dragon
0
34
Member Avatar for phorce
Member Avatar for phorce
0
209
Member Avatar for mike_2000_17

Sounds like its related to [this thread](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/427471/browser-goes-crazy)

Member Avatar for Dani
0
281
Member Avatar for rithish

you need to use an intermediate integer. int a,b,temp; temp = a a = b b = temp

Member Avatar for WaltP
0
103
Member Avatar for 9tontruck

It looks like all you get is the library's source code. You will have to compile the library yourself to generate the \*.lib or \*.dll

Member Avatar for gusano79
0
227
Member Avatar for rahul pareek

Yes, the default value of global variables is 0, that's not an error message. And the compiler is warning you that you did not put any code within the body of function main. That's also not an error. What compiler and operating system are you using? I don't know why …

Member Avatar for rithish
0
215
Member Avatar for osiron

The program exits because main() did not wait for the thread to complete its task. You need to create a mutex then call [pthread_cond_wait()](http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_cond_wait.html)

Member Avatar for L7Sqr
0
146
Member Avatar for Ancient Dragon

Every once in awhile I get email from my web site vBulletin that there is an error on MySQL. Below is the most recent error message. Looks like it might be caused by a hacker to me, what do you think? I've asked the technicians at iPage and they have …

Member Avatar for al c
0
317
Member Avatar for apanimesh061

> MinGW now supports version 4.7.0 I just installed the latest and greatest -- it's up to 4.7.8

Member Avatar for triumphost
0
2K
Member Avatar for rithish

You should never ever use gets() because it will allow you to enter more characters then the buffer can hold, excess characters are just scribbled all over memory and your program will crash. There are a couple ways to avoid that problem 1. fgets() -- e.g. fgets(name, sizeof(name), stdin); The …

Member Avatar for Ancient Dragon
0
187
Member Avatar for I_m_rude

[Here](http://en.wikipedia.org/wiki/C_preprocessor) is a good wiki article about preprocessor directives. As for your program. This may compile, but it won't work because it's recursive. main() should never be called by your program. int fun( int foo() ) { return foo(); } int main() { fun(main); }

Member Avatar for deceptikon
0
114
Member Avatar for andy8521

what compiler are you using? Did you try using your compiler's debugger to find the problem? If you don't know how to do that then right now is a good time to start learning how to use it. Can't you just call the standard C function atof() to convert a …

Member Avatar for WaltP
0
164
Member Avatar for 111100/11000

> if ((&chouseing_alphabet[0] == abc[0]) Why are you trying to compare the address of a variable with the value of another variable? abc[0] is not an address. If you only want to compare the two characters then remove the & address operator.

Member Avatar for Ancient Dragon
0
222
Member Avatar for aangner

cin.fail is not used to keep the screen open -- it is used to simply test to find out if cin succeeded or not. If you want to keep the screen open call cin.get().

Member Avatar for aangner
0
514
Member Avatar for wiliams.kikert

I can't help you with converting to java, but if you expect anyone to actually read your program you need to format it better. Make liberal use of spaces to make your code easier to read. For example, here's the first few lines of your program #include <stdio.h> #include <stdlib.h> …

Member Avatar for Ancient Dragon
1
157
Member Avatar for sathvikareddy57

Depends on what you mean by "remove". If you just want to change the nonalphas to something else then use the previous suggestion. Otherwise if you have to move the remaining charactes around to fill up the gaps then you need to create a loop to look at each character. …

Member Avatar for Ancient Dragon
0
101
Member Avatar for nekoleon64

You need to have another counter that stores the index value of the highest number then add another line to the if statement on line 20 to set that integer to the current value of i loop counter. Don't forget to put { and } around that if statement.

Member Avatar for WaltP
0
3K
Member Avatar for rithish
Re: exe

It depends on the operating system you want to use. On MS-Windows you need a c and/or c++ compiler, such as free Code::Blocks with MinGW compiler or VC++ 2010 Express. On \*nix you can use free gcc or g++ compilers. You can create/compile programs for other operating systems by using …

Member Avatar for Ancient Dragon
0
154
Member Avatar for gizmo7008

you can not delete arrays or other objects that were not allocated with new. All you have to do is delete line 85 because its not needed.

Member Avatar for gizmo7008
0
251
Member Avatar for rahul pareek

In c and c++ languanges arrays do not have negative index values. If you tried to print that then it is by coincidence that the program worked at all. One reason it may have worked for you is if you declared two integers just before you declared the array so …

Member Avatar for rahul pareek
0
191
Member Avatar for syeda amna

The file was written on one operating system such as MS-Windows and you are trying to view it on another os such as *nix. The only way to remove those rectangles is to translate the file from MS-Windows to *nix. MS-Windows uses two bytes as a line terminator -- "\r\n" …

Member Avatar for Ancient Dragon
0
96
Member Avatar for nstruzik

You have not populated the vector v with student class objects. After you do that then you can call std::sort() to sort the vector. pass std::sort() the cmp() function you have already written as the last parameter.

Member Avatar for Ancient Dragon
0
222
Member Avatar for MasterHacker110

> Strange i run into more errors with C++ than C. C is an older language, but c++ is a much stricter language. There are lots of things that you can get away with in C that you can't in c++, and C will let you hang yourself a lot …

Member Avatar for MasterHacker110
0
3K
Member Avatar for Hammad Akhtar
Member Avatar for Ancient Dragon

My computer has USB keyboard and mouse. After using the Windows installer to install Ubuntu on my system and rebooting, the duel-boot menu popped up where I can select either Windosw 7 or Ubuntu. The problem is that my keyboard doesn't work at that point because it is USB, so …

Member Avatar for elhijodelpeje
1
166
Member Avatar for eswar.ch.35
Member Avatar for osiron

delete line 6 and just make normal assignments inside he function. AFAIK you can only do what you did on line 6 with class reference variables, which id_ and name_ are not.

Member Avatar for osiron
0
106
Member Avatar for newbie14

maybe once a second is too frequent -- slow it down to once every 15 seconds and see if it still gives errors.

Member Avatar for newbie14
0
242
Member Avatar for Vectorizm
Member Avatar for Vectorizm
0
399
Member Avatar for juljan30

Your program is missing { and } around the if statement because the if statement consists of multiple lines if(numArray[i]%2==0) { printf("%d", numArray[a]); total+=numArray[a]; } Line 20 also has a problem: variable n was never declared, and the result will only be an integer because ave is an integer.

Member Avatar for WaltP
0
126
Member Avatar for juljan30

remove the brackets on lines 15 and 18 because they are not necessary. Also format the program a little better to make it easier for you to follow the flow of the program. #include<stdio.h> int main() { int numArrays[] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; …

Member Avatar for WaltP
0
190
Member Avatar for Ancient Dragon

After posting code using the Code button no line numbers appear and I can't double-click to highlight the posted code. See [this thread](http://www.daniweb.com/software-development/cpp/threads/428146/wats-wrong-with-this-code-calculating-the-average). Everything works correctly in the original post to that thread, but not in mine where I used the Code button.

Member Avatar for Dani
0
338
Member Avatar for juljan30

what does it do or what does it not do that you want it to do? We need a bit more information about that the problem is. I can tell you that you don't need line 29. Please don't create new threads to ask additional questions about the same problem, …

Member Avatar for Ancient Dragon
0
159
Member Avatar for marreameathue

line 5: remove "Dim ;" -- that's not a valid statement line 7: remove the ; from the beginning of the line and put it at the end of the previous line line 18: The number of parameters and type of parameters must match exactly with those shown in the …

Member Avatar for Ancient Dragon
0
267
Member Avatar for LastMitch

I mean [this button](http://developers.facebook.com/docs/reference/plugins/login/)

Member Avatar for LastMitch
0
307
Member Avatar for rajatC

After creating the command prompt window you have to add the dev-cpp\bin to your PATH environment then execute make.exe [quote] c:\Dev-C++:>make -f makefile.win <Enter>[/quote] The makefile.win should have been generated by the Dev-C++ IDE. If not, then you will either have to learn how to create it manually (its a …

Member Avatar for joaquince
0
3K
Member Avatar for Monster99d

Yes, use call Sleep() to make the program pause for the desired about of time then rewrite the text. #include <iostream> #include <windows.h> int main() { cout << "Hello ..."; Sleep(2000); // wait for 2 seconds cout << "How are you?\n"; } It's something similar with Windows Forms or MFC …

Member Avatar for Ancient Dragon
0
93
Member Avatar for asif49

> I'm hoping for someone hopefully with a law background to give me an overview of what needs considering. That's not advisable -- its similar to asking someone with a little medical training to give you advance about an operation. Go see a licensed lawyer for legal advice, and go …

Member Avatar for asif49
0
139
Member Avatar for silvercats

You don't need to decompile a compiled program just to read the strings, any program such as debug.exe will easily display that along with the hex values of all the non-text bytes.

Member Avatar for Ancient Dragon
0
342
Member Avatar for hackit

Here isn't much to them. [Here](https://www.google.com/#hl=en&sclient=psy-ab&q=pragma+directive+in+c&oq=pragma+direc&gs_l=hp.1.1.0l4.0.0.1.171.0.0.0.0.0.0.0.0..0.0...0.0...1c.tEpiMglhB3c&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=158101d518659935&biw=1174&bih=545) are some links you should read. Not all compilers implement them.

Member Avatar for Ancient Dragon
0
97
Member Avatar for bob24bob

You have to have admin privledges to do what you want to do. It's a security thing. Security would be severly breached if just anyone could view passwords.

Member Avatar for Not possiblguy
0
183
Member Avatar for anuran

Serial communication is inherently sloooow, which is one reason hardware manufactures switched to USB. This is one are in which MS-DOS 6.X did a lot better than MS-Windows or \*inix because MS-DOS was pretty close to a real-time operating system and programmers had complete access to the hardware and ports.

Member Avatar for Ancient Dragon
0
329
Member Avatar for mike_2000_17

> Anybody else excited about this? Not really. Its about as exciting as a wet noodle. The discovery of DNA was indeed very exciting because it affects our every day lives. Maybe in a few years my attitude about it will change once we know how, or if, it has …

Member Avatar for DavidB
1
167
Member Avatar for fatimah batool

> PLease help me in adding files to this code is it very simple for What exactly is your question? What compiler? what operaring system? WWat do you want the files to contain? Please explain your needs in greater detail.

Member Avatar for Schol-R-LEA
1
202

The End.