15,300 Posted Topics

Member Avatar for Snehamathur

The mod operator is simply the remainder after division. For example, 4%2 is 0 because the remainder after 4/2 is 0. The mod operator works only on integers, not floats or doubles. There is no code to give you because that's all it is -- a simple 5th grade math …

Member Avatar for Snehamathur
0
187
Member Avatar for muze

what have you tried? The first two parameters to MessageBox do not ave to be string literals, they can be pointers to strings.

Member Avatar for muze
0
86
Member Avatar for madan.uba@gmail

First check to see if you have to compile that library yourself, or does it already contain *.lib files that you need. Normally *.tar files were compressed from a *nix distribution, not MS-Windows. With Dev-C++ (which itself is ancient and outdated) you most likely will have to create a static …

Member Avatar for Ancient Dragon
0
611
Member Avatar for Hayzam_#include

I once crashed the entire Unix operating system with a one-line statement:[icode]int* ptr = malloc(sizeof(int) * (MAX_INT_SIZE+1));[/icode] MS-Windows operating system today is pretty stable and won't allow a single program to crash the entire os. I haven't seen such a crash in quite a few years.

Member Avatar for Ancient Dragon
-1
238
Member Avatar for ntaraaki

How is the file formatted? Does it contain fixed or random length records? Binary file or text file? We have to know everything about the file before your question can be answered.

Member Avatar for ntaraaki
0
900
Member Avatar for mechbas

There is a list of the top 100 members that is probably more useful than the full list because the top 100 members will include most, if not all, the active members who post here. See the "Top Members By Rank" link the very top of the page.

Member Avatar for mechbas
0
135
Member Avatar for ram619

>>because the compiler prints the Don't blaim the compiler for the code you wrote :) The logic of your program is flawed. scanf("%c" expects you to enter an alphabetic character, such as 'D'. The switch statement is checking for numeric data, such as 0, 1, 2, ... Since you used …

Member Avatar for Kamatari
0
137
Member Avatar for MasterGberry

You could replace char* name with std::string name so that you do not have to allocate any memory for that variable. If that doesn't fix the problem then the problem is caused by something else in your program, such as buffer overflow somewhere else that is destroying the heap.

Member Avatar for Ancient Dragon
0
144
Member Avatar for MasterGberry

Let's say you have two *.cpp files -- A.cpp and B.cpp [icode] cl A.cpp B.cpp c. a.obj b.obj -o myprogram.exe [/icode] There are of course lots of other flags you can add but the above is the simplest. If you bother to learn VC++ 2010's integrated IDE you wouldn't have …

Member Avatar for Ancient Dragon
0
110
Member Avatar for gahhon

One way to solve it is just before [icode]fprintf(AppendingFile, "\n");[/icode] call fseek() to move the file pointer backwards one character., such as [icode]fseek(AppendingFile,-1,SEEK_CUR);[/icode]

Member Avatar for gahhon
0
97
Member Avatar for piloudoc

I've been using Code::Blocks on 64-bit Windows 7 for some time now and with none of the problems you described. Are you reading [URL="http://gpwiki.org/index.php/SDL_ttf:Tutorials:Basic_Font_Rendering"]this tutorial[/URL]? If not then maybe you should

Member Avatar for Ancient Dragon
0
98
Member Avatar for muze

>>Any idea? Yes, replace the relative path with full path to the *.lib file. You obviously have used the wrong relative path.

Member Avatar for Ancient Dragon
0
78
Member Avatar for Defoe

your program looks ok until line 28. At that point all you have to do is sum up the three numbers on each of the 5 rows of the 2d array and display the largest sum value. You don't need GrandA, GrandB, or GrandC. just int sum and int largest_sum.

Member Avatar for Defoe
0
109
Member Avatar for mca.narender

Those functions are not defined in the files you posted so they must be in another file or library that you need to add to the solution. Look in your 32-bit project and find out where those function are found.

Member Avatar for Ancient Dragon
0
145
Member Avatar for mhaviv

>>I should get an error message and not an incorrect value. No. Its your fault, not the compiler's. A compiler can only produce erros/warnings on the code it sees at compile time. It knows nothing about runtime errors.

Member Avatar for NathanOliver
0
92
Member Avatar for 3xc

Maybe he is trying to ask what kinds of operating systems are in common use???

Member Avatar for Ancient Dragon
0
63
Member Avatar for shinsengumi

I don't know what w3m is, but do you mean someting like [icode]system("w3m");[/icode]?

Member Avatar for Ancient Dragon
0
96
Member Avatar for claudiordgz

You need to find out what PVOID is defined to be. If it's not defined to be anything, such as [icode]define PVOID[/icode] then the compiler will produce C4430. If you don't know what C4430 error is then look it up with google. >>HAPTIK_DLL_IMPORT_EXPORT Your program need to define that symble …

Member Avatar for Ancient Dragon
0
553
Member Avatar for Obsidian_496

You could do this [code] class something { public: char attribute1[25]; char attribute2[25]; donkey(char* a, char* b) { strcpy(attribute1,a); strcpy(attribute2,b); } donkey(){} }; [/code]

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

You might find [URL="http://cboard.cprogramming.com/c-programming/97116-c-big-numbers-storing-them.html"]this thread [/URL]interesting and useful

Member Avatar for Ancient Dragon
0
60
Member Avatar for muthu1802
Member Avatar for Ancient Dragon
0
185
Member Avatar for GrimJack
Member Avatar for Nick Evan
3
57
Member Avatar for digitaldan

lines 41 and 42 are duplicates. delete one of them. Your program has a number of errors in it -- here is a corrected copy. I changed the indentation of some loops to make it easier for me to see what it's doing -- you can just ignore my style …

Member Avatar for digitaldan
0
193
Member Avatar for xxunknown321

Your program compiled and ran ok for me using VC++ 2010 Express on 64-bit Windows 7. Here's the output I got, but I don't know if it's right or wrong. [icode] 1 2.5 3 3.5 3.6 5 6 7 7.9 8 8 9 10.5 12.6 14 45 Press any key …

Member Avatar for xxunknown321
0
174
Member Avatar for frogboy77

If you are talking about an int or float array, the answer is no because there is no such value as infinity. Integers have maximum values, which are declared in limits.h header file.

Member Avatar for frogboy77
0
75
Member Avatar for Raja Paul

You will want to call FindFirstFile() and FindNextFile() to get a list of all the files and folders, then display the information in a tree control. You can get examples of tree controls from [url]www.codeproject.com[/url], the largest repository of c++ code for MS-Windows on the internet. Once you are on …

Member Avatar for WASDted
0
93
Member Avatar for zacory

It's missing the first file because your program is tossing it into the bit bucket. findfirst() finds the first file then your program immediately calls findnext(), which dumps the result from findfirst(). You need to rearrange the logic of that funcion so that it does something with the results of …

Member Avatar for zacory
0
148
Member Avatar for tomtetlaw

Look at [URL="http://winprog.org/tutorial/"]this tutorial [/URL]and maybe it will tell you what you are doing wrong.

Member Avatar for Ancient Dragon
0
95
Member Avatar for zhuimeng

What is it that you are trying to do? Very doubtful that anyone here knows how to read Chinese.

Member Avatar for Ancient Dragon
0
239
Member Avatar for gahhon

>>but the problem is once i enter '1', it ask me again the question Because yuou have the question twice in your program, once on line 43 and again on line 56.

Member Avatar for vinitmittal2008
0
146
Member Avatar for mcodesmart

This makes more sense [code] bit running = 0; float var1, average_value; void is_something_running(void) { running = (fabs(var1 - average_value) <= 0.001) ? 0 : 1; return running; } [/code]

Member Avatar for Ancient Dragon
0
124
Member Avatar for anurag09

[code] int temp; int a = 1; int b = 2; // swap a and b temp = a; a = b; b = temp; [/code]

Member Avatar for Momerath
-2
127
Member Avatar for BimBam

>>int matrixSize(ParserDVG::NodeElems.size()); That looks like a function prototype. You can't put executable code such as .size() there.

Member Avatar for alwaysLearning0
0
219
Member Avatar for shinsengumi
Member Avatar for Nick Evan
0
548
Member Avatar for fyezool

single [icode]int array[10];[/icode] multidimensional: [icode]int array[10][3];[/icode] This is more like a spreadsheet where it has 10 rows and 3 columns per row.

Member Avatar for fyezool
0
152
Member Avatar for alaa sam

>>is there's anyway to output anything when the computer stops (when it ran's out of stacks ) Nope -- your program is trashed at that point. Post the function you are attempting to write, and tell us the compiler and operting system.

Member Avatar for alaa sam
0
106
Member Avatar for lochnessmonster

anything except executable code/functions. There is no standard that says what you can and can not put in heder files -- its just common sense.

Member Avatar for mike_2000_17
0
311
Member Avatar for syok

>>i need answer for my asingment,please So what don't you understand about the assignment? Hint: No one is going to write it for you unless you pay them lots of $$$.

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

I have two cases of vintage Bud Light beer (2+ years old now) that I'd like to sell.

Member Avatar for MosaicFuneral
0
95
Member Avatar for natha_peepli

line 5: float vector[]; arrays are declared with the star, like this: [icode]float* vector;[/icode] In the constructor you need to allocate memory for the array [icode]vector = new float[x];[/icode] Change the name [b]vector[/b] to something else because vector is the name of a c++ class declared in <vector> header file.

Member Avatar for natha_peepli
0
171
Member Avatar for araib

The only way to physically delete a record from the file is to rewrite the entire file. If the file is small enough then just read the entire thing into memory, then write it back out to the same file but omitting the record to be deleted. Another method that …

Member Avatar for araib
0
365
Member Avatar for vvvvvv89

strncpy() is just like strcpy() but you can specify the maximum number of characters to be copied. But you have to be careful with that function because it will not null terminate the destination sting if the source string is longer than the number of characters you specfy in the …

Member Avatar for Ancient Dragon
0
146
Member Avatar for D33wakar

Maybe you are searching for the wrong thing. [URL="http://lmgtfy.com/?q=winsock+tutorials"]Try this one.[/URL]

Member Avatar for Ancient Dragon
0
68
Member Avatar for Andrew Davis 64

Yes, of course you can create java source files from c++. Once the java source code is created just run it though a java compiler.

Member Avatar for geojia
0
211
Member Avatar for bijeta

C and C++ languages do not perform garbage collection. That is left up to the programmer.

Member Avatar for Ancient Dragon
0
73
Member Avatar for natha_peepli

In your example x is an integer while var is a character array. In that case x can not be a pointer to var without a typecast. [URL="http://daweidesigns.netfirms.com/cgi-bin/pointers.php"]Here[/URL] is a good explaination of pointers.

Member Avatar for Ancient Dragon
0
76
Member Avatar for MasterGberry

>>while ('q' != getline(cin, str)) getline() doesn't return a character; it returns the [b]this[/b] pointer.

Member Avatar for MasterGberry
0
133
Member Avatar for saad749

Don't hold your breath waiting to find the answer for Turbo C. [URL="http://cboard.cprogramming.com/c-programming/110163-loading-displaying-images.html"]Here[/URL] is just one of may threads you can find about that topic. Doesn't look good for you.

Member Avatar for Ancient Dragon
0
1K
Member Avatar for KushMishra

[URL="http://msdn.microsoft.com/en-ca/beginner/cc305129.aspx"]Here is one[/URL]

Member Avatar for KushMishra
1
203
Member Avatar for aikiart

line 16: variable phone is too small. strncpy() must have enough room for NULL terminator. Must be at least 6 characters, not 5. Since you are wriing a c++ program why don't you replace C character arrays with std::string? std::string is a lot easier to work with than character arrays, …

Member Avatar for Ancient Dragon
0
161

The End.