Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 36 of 36
Search took 0.02 seconds.
Search: Posts Made By: iradic
Forum: C Apr 16th, 2007, 6:22 AM
Replies: 21
Views: 587
Posted By iradic
I found this article recently and remebered this...

I found this article recently and remebered this post...
Generating random numbers
http://www.embedded.com/showArticle.jhtml?articleID=20900500
Forum: C++ Mar 29th, 2007, 3:02 AM
Replies: 0
Views: 93
Posted By iradic
WinAPI GetProcAddress?

Hi,

If an WinAPI function is implemented as Unicode and ANSI version can I use normal name in the GetProcAddress call?

example:

GetProcAddress (handle, TEXT("CreateHardLink"));

or
Forum: C Mar 12th, 2007, 2:14 PM
Replies: 1
Views: 159
Posted By iradic
wchar_t and ascii

Hi,
Is it ok to assume that ascii characters have the same value for char and wchar_t types.

That is:

char 'a' == wchar_t L'a'


Bye
Forum: Perl Feb 15th, 2007, 3:46 AM
Replies: 1
Views: 330
Posted By iradic
IMHO it will not do what you want...

IMHO it will not do what you want...
Forum: C++ Jan 13th, 2007, 7:41 PM
Replies: 4
Views: 149
Posted By iradic
My reply is a bit shorter. Thanks!

My reply is a bit shorter.

Thanks!
Forum: C++ Jan 13th, 2007, 4:51 PM
Replies: 4
Views: 149
Posted By iradic
This was the case of multiple include problem it...

This was the case of multiple include problem it seems...

Here is the problem:
Function pointer is in header file which gets included by multiple source files and then in linking process I get...
Forum: C++ Jan 13th, 2007, 2:39 PM
Replies: 4
Views: 149
Posted By iradic
Function pointer?

Is it possible to define function pointer globally?

I'm getting strange errors when I do that, but defining it in function body works fine.



void (*show) (String msg, int level, Type tip);

in...
Forum: C++ Dec 19th, 2006, 10:38 PM
Replies: 18
Views: 318
Posted By iradic
Do you suggest then to use: // write os.write...

Do you suggest then to use:

// write
os.write ((const char *) &chunk.formatSize, 4);

// read
is.read ((const char *) &chunk.formatSize, 4);


Is there any difference between:
Forum: C++ Dec 19th, 2006, 1:58 PM
Replies: 18
Views: 318
Posted By iradic
Data I'm trying to read is mostly headers or such...

Data I'm trying to read is mostly headers or such information that describes file format... Usually it's a series of bits (flags) or sometimes mix of chars (a-z) and ints uints longs and such...
For...
Forum: C++ Dec 19th, 2006, 12:49 PM
Replies: 18
Views: 318
Posted By iradic
No that's not the case! Bad joke maybe... While...

No that's not the case! Bad joke maybe...

While I am here, I will ask something:

How do I read a unsigned int (0-255) stored in 8-bits from the file?
Is this the only way:

unsigned char...
Forum: C++ Dec 19th, 2006, 7:32 AM
Replies: 18
Views: 318
Posted By iradic
Thanks, for now I will use what...

Thanks, for now I will use what works...

Bye...

PS: In the future whenever I find something not clear to me I will say: "Ah, it's probably implementation defined".
Forum: C++ Dec 19th, 2006, 7:12 AM
Replies: 18
Views: 318
Posted By iradic
Well, there are questions below the code and...

Well, there are questions below the code and error message is inside code comments (following with the error expression)...

Anyway, it's just confusing a bit for me all this stuff...

For example if...
Forum: C++ Dec 19th, 2006, 6:38 AM
Replies: 18
Views: 318
Posted By iradic
Ok, let's say I'm ok with that... But why is...

Ok, let's say I'm ok with that...

But why is then:

istream &read( char *buffer, streamsize num );


How do you read binary then, properly? No way...

Or is this the only way...
Forum: C++ Dec 19th, 2006, 12:20 AM
Replies: 18
Views: 318
Posted By iradic
Casting?

Can someone explain what's going on here:



#include <iostream>

using namespace std;

int to_int ( char ch );
Forum: C++ Dec 14th, 2006, 9:28 PM
Replies: 8
Views: 159
Posted By iradic
Edit doesn't show in my first post?

Edit doesn't show in my first post?
Forum: C++ Dec 14th, 2006, 9:25 PM
Replies: 8
Views: 159
Posted By iradic
Confusion all over the place... :) Jessehk...

Confusion all over the place... :)

Jessehk correctly read my mind...

Thanks again bye..

PS: I will edit original post.
Forum: C++ Dec 14th, 2006, 8:45 PM
Replies: 8
Views: 159
Posted By iradic
Ok, thanks... I understand now...

Ok, thanks... I understand now...
Forum: C++ Dec 14th, 2006, 6:42 PM
Replies: 8
Views: 159
Posted By iradic
namespace alias?

How to use it correctly?

I have a header where I put


namespace out {
class in { /* code */ };
}
Forum: Other Scripting Languages Nov 11th, 2006, 9:11 PM
Replies: 0
Views: 273
Posted By iradic
Exclude dir from svn update?

Title says it all...

How do I exclude certain directories when doing "svn update" command?

Thanks
Forum: C Oct 23rd, 2006, 1:13 PM
Replies: 10
Views: 246
Posted By iradic
Code is not mine, it's from minised...

Code is not mine, it's from minised project...

Here is the whole function:

/* write a hex dump expansion of *p1... to fp
p1: the source
fp: output stream to write to */
static void...
Forum: C Oct 23rd, 2006, 9:27 AM
Replies: 10
Views: 246
Posted By iradic
Ok thanks ... For now I will just remove "p1 <...

Ok thanks ...

For now I will just remove "p1 < spend", and see how it goes...

Thanks bye
Forum: C Oct 22nd, 2006, 7:10 PM
Replies: 10
Views: 246
Posted By iradic
Thumbs up statement with no effect?

I would like to correct the following so that gcc no more complains with "warning: statement with no effect" ... if possible:


static char *spend;

static void listto(char *p1, FILE...
Forum: C Oct 22nd, 2006, 7:05 PM
Replies: 13
Views: 299
Posted By iradic
linker error means you didn't link the library...

linker error means you didn't link the library with your object files...

If you are in DevCpp there is an option to add library to linker (Project Properties I believe)...

Or add it manually in...
Forum: Bash / Shell Scripting Oct 22nd, 2006, 12:08 PM
Replies: 2
Views: 240
Posted By iradic
I figured it out... Makefile gets truncated if...

I figured it out...

Makefile gets truncated if redirected to it before script is run (and Makefile copied)...

Bye
Forum: Bash / Shell Scripting Oct 21st, 2006, 2:57 PM
Replies: 2
Views: 240
Posted By iradic
And here is some more "funny" stuff... Bash...

And here is some more "funny" stuff...

Bash debug output:


$ cp copy Makefile

$ mage.sh -u *.c > new
Makefile -> /tmp/_mage.sh.1144.mak
++ grep -q '^dlist[$](OBJ):' /tmp/_mage.sh.1144.mak
Forum: Bash / Shell Scripting Oct 21st, 2006, 12:44 PM
Replies: 2
Views: 240
Posted By iradic
Bash scirpt help (msys)?

I wrote a script to generate makefiles...

And it works but not always :)

Here is some info output...

This shouldn't happen:

$ mage.sh -u *.c > Makefile
Makefile -> /tmp/.mage.sh.432.mak
Forum: C Oct 10th, 2006, 1:30 PM
Replies: 3
Views: 194
Posted By iradic
Ok, thanks for input... Could you (or someone...

Ok, thanks for input...

Could you (or someone else) tell me the difference between using "const char" and "char" in args...
i only know that it should prevent changing arg passed as "const char" -...
Forum: C Oct 10th, 2006, 1:47 AM
Replies: 3
Views: 194
Posted By iradic
(new) strtox function?

Here is strtox function. It's a variant of tokenize string functions. I couldn't find any similar function on the net so I wrote one.

Args:
source - string to be tokenized
token - token
tox -...
Forum: C Apr 13th, 2006, 12:03 AM
Replies: 42
Views: 926
Posted By iradic
Resources

http://cslibrary.stanford.edu/

Some resources, more and less related to this thread. I think they can be of help for you deanosrs.

Pointers and Memory
==============
Binky Pointer Video picture...
Forum: C Mar 29th, 2006, 3:12 AM
Replies: 6
Views: 246
Posted By iradic
Ok, thanks.

Ok, thanks.
Forum: C Mar 28th, 2006, 4:07 PM
Replies: 6
Views: 246
Posted By iradic
Ups, another missunderstanding, my...

Ups, another missunderstanding, my fault.

Actually the question isn't related to "fread" and such (I should have started my post this way). I was coding and I had one function:
void file_read (FILE...
Forum: C Mar 28th, 2006, 12:43 PM
Replies: 6
Views: 246
Posted By iradic
Sorry, for being unclear. No, I want the size of...

Sorry, for being unclear.

No, I want the size of "char *buf" with null char in it.
Forum: C Mar 28th, 2006, 12:18 PM
Replies: 6
Views: 246
Posted By iradic
Char ptr/array size?

How do I check this:


int main (int argc, char **argv)
{
int size;
char buf[16];
FILE *fp = fopen ("file.dat", "rb");
fread (buf, 16, 1, fp);
size = get_size (buf);
Forum: C Mar 26th, 2006, 5:24 AM
Replies: 2
Views: 200
Posted By iradic
fread question?

What's the difference between:

fread(buf, 1024, 1, fp);
and
fread(buf, 1, 1024, fp);

It seems to me that you can use both notations (whth some care). Right?
Forum: C Mar 7th, 2006, 6:15 AM
Replies: 3
Views: 259
Posted By iradic
Of course :) Thanks. I decided one-in one-out...

Of course :) Thanks.

I decided one-in one-out for now ... maybe I will change this later if I feel happy with the program.
Forum: C Mar 5th, 2006, 9:37 AM
Replies: 3
Views: 259
Posted By iradic
Multiple file input how to?

Hi, it's my first post here.

I'm learning c language and as my first real program I took an mp3 tag reader. I wrote the program but I restricted it only to one file as input.
Now what are the...
Showing results 1 to 36 of 36

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:23 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC