Search Results

Showing results 1 to 40 of 102
Search took 0.03 seconds.
Search: Posts Made By: adatapost ; Forum: C and child forums
Forum: C 11 Hours Ago
Replies: 8
Views: 122
Posted By adatapost
>you can't use variables to declare an array.

C99 (http://en.wikipedia.org/wiki/Variable-length_array) support variable length array. A variable length array, which is a C99 feature, is an array...
Forum: C 3 Days Ago
Replies: 9
Views: 192
Posted By adatapost
You are a bit lazy. I recommend code::blocks (http://sourceforge.net/projects/codeblocks/files/Binaries/8.02/codeblocks-8.02mingw-setup.exe/download).
Forum: C 3 Days Ago
Replies: 2
Views: 197
Posted By adatapost
Try to use if..else.


if (soldYesterday > soldToday)
{
/* statements */
}
else
{
/* statements */
Forum: C 3 Days Ago
Replies: 9
Views: 192
Posted By adatapost
Take a look at this sticky thread - Read Me: Starting " C " (http://www.daniweb.com/forums/thread50370.html).
Forum: C 16 Days Ago
Replies: 2
Views: 263
Posted By adatapost
I think probably you don't understand what an enum (http://publications.gbdirect.co.uk/c_book/chapter6/enums.html) is. You can think of it as a sort of compile time #define. Take a look at this...
Forum: C 16 Days Ago
Replies: 6
Views: 488
Posted By adatapost
Hi,
Take a look at this article - http://linuxgazette.net/111/ramankutty.html
Forum: C 19 Days Ago
Replies: 3
Views: 337
Posted By adatapost
Flush (http://www.daniweb.com/forums/thread40291.html)the keyboard input buffer.
Forum: C 19 Days Ago
Replies: 5
Solved: char in c?
Views: 370
Posted By adatapost
In C language, char (http://en.wikipedia.org/wiki/Primitive_data_type#Characters_and_strings)value is stored in 1 byte. A char type may contain a single letter, digit, control character or special...
Forum: C 23 Days Ago
Replies: 4
Views: 312
Posted By adatapost
Flexible array members are a C feature introduced in C99 whereby one can declare the last element to be an array of unspecified size.
Forum: C 24 Days Ago
Replies: 4
Views: 361
Posted By adatapost
Read this FAQ - What are pointers really good for, anyway? (http://c-faq.com/ptrs/goodfor.html)
Forum: C 30 Days Ago
Replies: 2
Views: 214
Posted By adatapost
C string is an array of characters. You may set or get a character at specific index.

char str[20]="ABC";
str[0]='a'; // replace 'A' with 'a'


C String (char array) is terminated with a '\0'...
Forum: C Oct 25th, 2009
Replies: 2
Views: 145
Posted By adatapost
Welcome,

Turbo C is a name of C language compiler. Please have a look at the List of Compilers (http://en.wikipedia.org/wiki/List_of_compilers).

As Ancient Dragon suggests; use standard C...
Forum: C Oct 25th, 2009
Replies: 6
\n
Views: 210
Posted By adatapost
It discards unwanted white space.
A white-space character in the control string causes scanf() to skip over one or more leading white-space characters in the input stream.


int main()
{
char...
Forum: C Oct 25th, 2009
Replies: 2
Views: 155
Posted By adatapost
Read the The %n Specifier...
Forum: C Oct 25th, 2009
Replies: 3
Views: 264
Posted By adatapost
You may try this code,

void isSorted(int a[], int n) {
int i;
/* descending order */
for (i=1;i<n;++i) {
if (a[i]<a[i-1]) {
break;
}
}
Forum: C Oct 24th, 2009
Replies: 1
Views: 278
Posted By adatapost
Here is the great ebook. Take a look at this page -http://beej.us/guide/bgnet/output/html/multipage/advanced.html#select
Forum: C Oct 23rd, 2009
Replies: 1
Views: 199
Posted By adatapost
Use [code] tags to post source code. Take a look at this article - http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/
Forum: C Sep 30th, 2009
Replies: 22
Views: 551
Posted By adatapost
Open/Create a data file using binary mode. c file io (http://www.cprogramming.com/tutorial/cfileio.html)

FILE *fp;
fp=fopen("c:\\test.bin", "wb");
char x[10]="ABCDEFGHIJ";
fwrite(x,...
Forum: C Sep 24th, 2009
Replies: 22
Views: 551
Posted By adatapost
I guess, you are looking for Random Access IO. Take a look at http://c-faq.com/~scs/cclass/int/sx2i.html.
Forum: C Sep 24th, 2009
Replies: 8
Views: 236
Posted By adatapost
@nateuni: I have been reading about memset but my understanding is it will not work for a struct.

I think memset is the way to go. You do not have many alternatives.
Forum: C Sep 24th, 2009
Replies: 4
Views: 175
Posted By adatapost
russy123,

GCC is a free, open source, high quality, compiler. You can get it with cygwin (http://www.cygwin.com/).

Microsoft makes a C compiler that comes with Visual Studio, which is...
Forum: C Sep 24th, 2009
Replies: 5
Views: 418
Posted By adatapost
dragonbone,

Don't post source code until opening poster has put some effort.


Use int main().

I use int main() - Depending on the exit code of the executable the initating application can...
Forum: C Sep 16th, 2009
Replies: 2
Views: 533
Posted By adatapost
Welcome sacredmaiden,

Show us your code work please. Read Homework policy (http://www.daniweb.com/forums/announcement8-2.html). Use bb code tag to post your code work.

See, How to use code...
Forum: C Sep 15th, 2009
Replies: 16
Views: 685
Posted By adatapost
ubi_ct83: this is the example of malloc cast isnt it?

Read these threads,

http://cboard.cprogramming.com/faq-board/25799-faq-casting-malloc.html
...
Forum: C Sep 14th, 2009
Replies: 5
Views: 278
Posted By adatapost
Whenever you use pointers make sure that you allocate memory first before using them.
Forum: C Sep 11th, 2009
Replies: 6
Solved: Return an array
Views: 596
Posted By adatapost
Returning an array as a whole is not possible in c-language. However you may use one of the following method:

1. Store an array within a structure and then return the structure.
2. Dynamically...
Forum: C Sep 10th, 2009
Replies: 16
Views: 685
Posted By adatapost
Take a look at http://www.daniweb.com/forums/thread5939.html



EDIT: Mentioned link is belongs to C++ example but it is an answer of your question.

For example,

double *getValues();
Forum: C Sep 8th, 2009
Replies: 2
Views: 397
Posted By adatapost
void pointers (http://142.132.30.225/programming/node87.html)

A void pointer seems to be of limited, if any, use. However, when combined with the ability to cast such a pointer to another type,...
Forum: C Sep 8th, 2009
Replies: 3
Views: 279
Posted By adatapost
Aarray variable is converted to a pointer to the first item in the array.

In both the cases, b1.name and &b1.name represent an address of 1st element of name member.


printf("\n%u ...
Forum: C Sep 7th, 2009
Replies: 7
Views: 1,258
Posted By adatapost
You are right, Gaity. Don't forget to post source code with bb code tags. Read [b]announcement[b/] link at the top for each forum page.
Forum: C Sep 4th, 2009
Replies: 2
Views: 315
Posted By adatapost
modotx,

Welcome to the daniweb.
Please read this sticky thread - Announcement - Please use BB Code and Inlinecode tags (http://www.daniweb.com/forums/announcement118-3.html).
Forum: C Sep 4th, 2009
Replies: 7
Views: 1,258
Posted By adatapost
LinkedList (http://en.wikipedia.org/wiki/Linked_list)
Forum: C Sep 4th, 2009
Replies: 4
Views: 287
Posted By adatapost
sizeof (http://en.wikipedia.org/wiki/Sizeof)
Forum: C Sep 4th, 2009
Replies: 8
Views: 383
Posted By adatapost
furqankhyraj,

Why don't you go get a read,

1. announcement - How to post your problems? (http://www.daniweb.com/forums/announcement118-3.html)
2. Should I used void main() or int main()?...
Forum: C Sep 4th, 2009
Replies: 20
Views: 917
Posted By adatapost
Compare two strings. (http://www.cplusplus.com/reference/clibrary/cstring/strcmp/)
Forum: C Aug 27th, 2009
Replies: 6
Views: 382
Posted By adatapost
Post source code along with data file. Use bb code tags.
for example,


.... statements...
Forum: C Aug 26th, 2009
Replies: 6
Views: 382
Posted By adatapost
ubi_ct83,
Welcome to the Daniweb.

You should have to read this Announcement - http://www.daniweb.com/forums/announcement8-3.html thread. So please read announcement and some sticky threads to...
Forum: C Aug 26th, 2009
Replies: 3
Views: 278
Posted By adatapost
Changes are,

1. In SearchFile1() function,


....
while ( fscanf( ptr, "%s%s%s%s" ,s_code,s_lname,s_fname,s_mname) == 4)
{
...
}
Forum: C Aug 26th, 2009
Replies: 2
Views: 316
Posted By adatapost
Read this article at Dr.Dobb's http://www.ddj.com/cpp/184402023


And here is a link of a very good book Secure Programming Cookbook for C and C++...
Forum: C Aug 25th, 2009
Replies: 3
Views: 338
Posted By adatapost
According to the MySQL API Documentation, MYSQL_ROW isn't null-terminated strings. You should use mysql_fetch_lengths() to copy your desired field to a new string.

Mysql API Documentation...
Showing results 1 to 40 of 102

 


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

©2003 - 2009 DaniWeb® LLC