Search Results

Showing results 1 to 40 of 109
Search took 0.02 seconds.
Search: Posts Made By: mitrmkar ; Forum: C and child forums
Forum: C Mar 31st, 2009
Replies: 4
Views: 342
Posted By mitrmkar
Maybe Beej's Guide to Network Programming (http://beej.us/guide/bgnet/output/html/multipage/index.html)
Forum: C Mar 31st, 2009
Replies: 10
Solved: minmax
Views: 680
Posted By mitrmkar
There is an initialization failure ...

for( i = 0; i < n; i++ ) numberlist[i] == rand() % n ;
Forum: C Mar 24th, 2009
Replies: 13
Views: 2,090
Posted By mitrmkar
Maybe print the error message (see grapherrormsg(...)) to a file to get a clue about what's wrong.
Forum: C Mar 14th, 2009
Replies: 5
Views: 524
Posted By mitrmkar
void createAlpha(char **&data, int elements);


Sorry, but that is strictly a C++ feature, not C.
Forum: C Mar 9th, 2009
Replies: 3
Views: 465
Posted By mitrmkar
struct test
{
int completion;
};

int main(int argc, char *argv[])
{
test code;
code // <- type in a . and a list displaying
// 'Variable int completion' should appear
Forum: C Mar 9th, 2009
Replies: 3
Views: 465
Posted By mitrmkar
It's called code completion/class browsing in wxDev-C++. See Tools/Editor Options/Class browsing.
Forum: C Mar 3rd, 2009
Replies: 6
Views: 445
Posted By mitrmkar
Try going through the py2exe tutorial (http://www.py2exe.org/index.cgi/Tutorial).


If you'll use py2exe to assemble all the files your python prog needs, you can skip the idea of coding anykind...
Forum: C Sep 26th, 2008
Replies: 8
Views: 842
Posted By mitrmkar
Hmm .. or even less


puts("*\n***\n******\n*******\n*********");
Forum: C Aug 21st, 2008
Replies: 3
Views: 410
Posted By mitrmkar
Maybe sprintf() (http://www.cplusplus.com/reference/clibrary/cstdio/sprintf.html) would be of use ...


char filename[20];

for(int ii = 0; ii < 10000; ii ++)
{
sprintf(filename,...
Forum: C Aug 15th, 2008
Replies: 13
Views: 2,444
Posted By mitrmkar
What if the last line contains the id being searched for and that line does not end with a newline?
Forum: C Aug 6th, 2008
Replies: 24
Views: 1,990
Posted By mitrmkar
Just out of curiosity, in which header can one find Gotoxy?
Forum: C Aug 4th, 2008
Replies: 15
Views: 1,574
Posted By mitrmkar
A minimal example of displaying three message boxes, each message box is displayed by a dedicated thread ...


#include <windows.h>

DWORD WINAPI ThreadProc(LPVOID lpParameter)
{
...
Forum: C Aug 3rd, 2008
Replies: 15
Views: 1,574
Posted By mitrmkar
Unless you use modeless dialog boxes, as suggested by Ancient Dragon, you need to have multiple threads in order to display multiple message boxes simultaneously by means of the MessageBox() function.
Forum: C Jul 23rd, 2008
Replies: 8
Views: 1,035
Posted By mitrmkar
...
double CelsiusToFahrenheit(double c);
...
int main()
{
...
}

double CelsiusToFahrenheit(double c) ; // <- remove the semicolon
{
Forum: C Jul 22nd, 2008
Replies: 38
Views: 2,384
Posted By mitrmkar
Isn't that quite obvious if you take a close look at the loop,


for(k=1;k<=10;k++)
{
// do this ten times ...

// ask the user for the file name <-> shouldn't you
// open the...
Forum: C Jul 15th, 2008
Replies: 2
Views: 468
Posted By mitrmkar
The function is malloc(), not maloc().
Forum: C Jul 13th, 2008
Replies: 23
Views: 1,565
Posted By mitrmkar
see here (http://www.daniweb.com/forums/misc-explaincode.html)
Forum: C Jul 6th, 2008
Replies: 17
Views: 1,237
Posted By mitrmkar
It's really best if you just post the code you are having problems with, explaining what the trouble is.
Forum: C Jul 4th, 2008
Replies: 15
Views: 17,622
Posted By mitrmkar
I think it just happens quite easily, consider a newbie who reads a thread and maybe sees something relevant/interesting in the "Similar threads" section (at the bottom of the page), clicks on a link...
Forum: C Jun 25th, 2008
Replies: 4
Views: 848
Posted By mitrmkar
I think you posted wrong version of your code, namely it should not even compile due to the line

scanf("%d, %d, %f", &d, &d, &f);


You don't have the variables d, or f in the program. Maybe...
Forum: C Jun 23rd, 2008
Replies: 15
Views: 4,012
Posted By mitrmkar
Here is the link John A posted ...
http://www.opengroup.org/onlinepubs/000095399/functions/exec.html
Forum: C Jun 11th, 2008
Replies: 2
Views: 501
Posted By mitrmkar
int myfunction(int argc, char *argv[]){
int i;
for(i=0;i<argc;i++)
unlink(argv[i]);
}
int main(){

int argc; // argc is not initialized to any value, what might be its value here ??...
Forum: C Jun 11th, 2008
Replies: 6
Views: 733
Posted By mitrmkar
Like Edward already showed, you need to know the size of the memory block to copy, then use malloc() to allocate a buffer large enough, and finally use memcpy() to copy the data to the allocated...
Forum: C Jun 10th, 2008
Replies: 26
Views: 3,045
Posted By mitrmkar
Have you tried Vintage Computer Forums?
http://www.vintage-computer.com/vcforum/index.php
Forum: C Jun 10th, 2008
Replies: 3
Views: 2,951
Posted By mitrmkar
You might use strtok(), see
http://www.cplusplus.com/reference/clibrary/cstring/strtok.html
Forum: C Jun 9th, 2008
Replies: 13
Views: 2,311
Posted By mitrmkar
The problem probably lies in how you use indexes. Note that array indexes are zero-based i.e. if you have an array holding 5 elements, the last valid index is 4, not 5. Consider


const char...
Forum: C Jun 8th, 2008
Replies: 11
Views: 1,363
Posted By mitrmkar
You might post the relevant parts of the code, otherwise there is no way to help much more.
Forum: C Jun 8th, 2008
Replies: 11
Views: 1,363
Posted By mitrmkar
How about getting rid of the original magic altogether? So you'd have untouched argv[] and simply hard-coded opt_httphost = "the hard-coded address";.
Forum: C Jun 8th, 2008
Replies: 11
Views: 1,363
Posted By mitrmkar
The memory that argv[0] points to is not writable.


Why don't you just do something like

opt_httphost = "the hard-coded address";
Forum: C Jun 8th, 2008
Replies: 8
Views: 705
Posted By mitrmkar
Let's say you type in one letter 'a' and press Enter, at that point, in the input buffer are two characters, the letter 'a' plus the newline character '\n'.
Now your program reads the letter 'a' and...
Forum: C Jun 5th, 2008
Replies: 8
Views: 1,267
Posted By mitrmkar
It's just not legal C, you are expected to write an expression there, not a return statement.
Forum: C Jun 5th, 2008
Replies: 27
Views: 3,296
Posted By mitrmkar
You open the port specifying FILE_FLAG_OVERLAPPED, but the WriteFile() call is missing the required pointer to an OVERLAPPED structure.
(87 == ERROR_INVALID_PARAMETER)
Forum: C Jun 3rd, 2008
Replies: 3
Views: 763
Posted By mitrmkar
See here for information on the permissions
http://linux.die.net/man/2/open


You might post this code that always produces empty copies so we can see what goes wrong.
Forum: C May 25th, 2008
Replies: 15
Views: 2,027
Posted By mitrmkar
One practical approach, to get you started, would be to post the code that is not compiling (along with the error message(s)).
Forum: C May 23rd, 2008
Replies: 11
Views: 1,693
Posted By mitrmkar
Unable to answer that one, but just for reference:

Compute natural logarithm / log()
http://www.cplusplus.com/reference/clibrary/cmath/log.html

Compute base-10 logarithm / log10()...
Forum: C May 22nd, 2008
Replies: 5
Views: 1,388
Posted By mitrmkar
Use plain %f with a double with printf(), see
http://msdn.microsoft.com/en-us/library/hf4y5e3w(VS.80).aspx

Mr Sinkula once pointed out (to me) that:
"using %lf with printf is undefined behavior...
Forum: C May 18th, 2008
Replies: 2
Views: 454
Posted By mitrmkar
:icon_wink:

Well, you just have to step forward and post something relevant to the problem(s).
Forum: C May 15th, 2008
Replies: 2
Views: 712
Posted By mitrmkar
Forum: C May 13th, 2008
Replies: 5
Solved: Stack problem
Views: 666
Posted By mitrmkar
<< if I try to push changed data using function, I get just the same word n times:
That happens because you are pushing pointers to one single buffer you have in your whole program, and that buffer...
Forum: C May 10th, 2008
Replies: 8
Views: 880
Posted By mitrmkar
>> Why does the DLL did not get other values of the array??? I do not understand that.

You output to the very same memory address each calculation

out[0]=m_A[n+1]; // out[0] output from "C" to...
Showing results 1 to 40 of 109

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC