Search Results

Showing results 1 to 37 of 37
Search took 0.05 seconds.
Search: Posts Made By: andor ; Forum: C and child forums
Forum: C Apr 13th, 2007
Replies: 4
Views: 1,843
Posted By andor
link (http://c-faq.com/expr/ieqiplusplus.html)
Forum: C Oct 9th, 2006
Replies: 1
Views: 3,258
Posted By andor
Read this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351)
Forum: C Oct 5th, 2006
Replies: 19
Views: 3,887
Posted By andor
It means how many of size_t_Size you want to write.
fwrite(buff, sizeof(int), 4, someFile) means you want to write four ints to file.
Forum: C Sep 30th, 2006
Replies: 10
Solved: need some help
Views: 2,291
Posted By andor
Use code tags (http://www.daniweb.com/techtalkforums/announcement8-3.html) and don't use void main (read this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044841143&id=1043284376))
Forum: C Sep 29th, 2006
Replies: 10
Solved: need some help
Views: 2,291
Posted By andor
With which part do you have problem? Formula for conversion or programming issue? For formulas, read this (http://www.google.com/search?hl=en&lr=&q=formula+temperature+conversion&btnG=Search). For...
Forum: C Sep 27th, 2006
Replies: 34
Views: 11,239
Posted By andor
The point is that ch is not NULL. Check the debug printf in my post
Forum: C Sep 27th, 2006
Replies: 34
Views: 11,239
Posted By andor
The seg fault is becouse if you dont have ';' then pch is NULL. So seg fault will happen only if you dont have ';' in the input string. You need to change the logic

#include<stdio.h>
#include...
Forum: C Sep 26th, 2006
Replies: 34
Views: 11,239
Posted By andor
Thats why we insist to post the code or if you cant, then U need to reconstruct the problem in smaler code. The post I posted don't give seg error, if U don't belive me compile and run the code which...
Forum: C Sep 26th, 2006
Replies: 5
Views: 2,567
Posted By andor
You are not calculating the total gallons after first gallon input before while, and after finishing the prog you are substacting from total gallons -1.
Forum: C Sep 25th, 2006
Replies: 34
Views: 11,239
Posted By andor
It means that ch is NULL. Your code have lot of compile errors. j not defined and tr structure not defined.

void function()
{
int i,index,k,m;
char str1[100],retry,str[100],*ptr,*ctr;
...
Forum: C Sep 22nd, 2006
Replies: 34
Views: 11,239
Posted By andor
Run this code

#include <stdio.h>
#include <string.h>
int main()
{
int num, ch;
char str[10];
char * ptr = NULL;
printf("Input some int: ");
Forum: C Sep 21st, 2006
Replies: 6
Views: 1,378
Posted By andor
Hm you need to performulate th question. Whats section? This word is too abstract
EDIT: Sorry after the second post its clearer
Forum: C Sep 20th, 2006
Replies: 11
Views: 6,763
Posted By andor
Don't know is it the best way but you can do like this. Parse the string until the space (' ') and the number until the space convert to int element of array.
Forum: C Sep 20th, 2006
Replies: 7
Views: 5,382
Posted By andor
The problem is that (if I understood the problem corectly) stringLenis 375 and output is 100 chars. Just you need is output[376]instead of output[100], of course if using this string

char...
Forum: C Sep 18th, 2006
Replies: 3
Views: 1,054
Posted By andor
Use code tags. U need to beautify little your post. I don't think that someone will read the whole post it's enormus. First of all don't use scanf("%s", string);. Read this...
Forum: C Sep 18th, 2006
Replies: 4
Views: 2,061
Posted By andor
>The program will accept a non-integer value, but I want it to continue reprompting the user when a non-integer is entered.
You can use fgets and then parse trought the string checking is it number...
Forum: C Sep 15th, 2006
Replies: 33
Views: 70,445
Posted By andor
Tried here (http://www.google.com/search?hl=en&lr=&q=download+free+turbo+C+compiler&btnG=Search)?
Forum: C Sep 14th, 2006
Replies: 6
Views: 3,574
Posted By andor
<gcc simply pass without giving errors or warnings
Well there are warnings. Try to copile like this
gcc var.c -o var -Wall
<When I went thru disassembly, I found nothing useful in it
ofcourse...
Forum: C Sep 13th, 2006
Replies: 3
Views: 2,906
Posted By andor
Put your code inside [ code][/code ] tags. Read post no 7 in this (http://www.daniweb.com/techtalkforums/thread54763.html) thread.
Forum: C Sep 13th, 2006
Replies: 50
Views: 8,408
Posted By andor
<<several intervening off-topic posts were deleted>>

Well the thread is not solved. Read post no 41

>Is it we have to replace it with fgets?
In your case it's better to do it with fgets...
Forum: C Sep 12th, 2006
Replies: 9
Views: 1,787
Posted By andor
Yes your right. I forgott the sizeof(int) and sizeof(int*) is not same on all machines. You have perfect eyes.
Forum: C Sep 11th, 2006
Replies: 3
Solved: C Quest 2
Views: 1,029
Posted By andor
#include <stdio.h>
#include <stdlib.h>

int func();

int main()
{
short mat[3][3],i,j;

for(i = 0 ; i < 3 ; i++)
Forum: C Sep 11th, 2006
Replies: 9
Views: 1,787
Posted By andor
Read this (http://en.wikipedia.org/wiki/Compatibility_of_C_and_C++)
Forum: C Sep 11th, 2006
Replies: 9
Views: 1,787
Posted By andor
To allocate two dimensional arrays

#include <stdlib.h>
#include <stdio.h>
int main()
{
int ** array, i;
array = calloc(256, sizeof(int));
if (array == NULL)
{
Forum: C Sep 6th, 2006
Replies: 3
Views: 1,150
Posted By andor
You mean segmentation fault? Accessing memory which is not suposed to access (you probably wonder wtf that means :)). It would be best to post your code so we could help you. More information here...
Forum: C Sep 5th, 2006
Replies: 12
Views: 3,636
Posted By andor
Try to search at google (http://www.google.com/search?hl=en&lr=&q=state+transition+diagram&btnG=Search)
Forum: C Sep 4th, 2006
Replies: 4
Views: 2,896
Posted By andor
Ok you can use those library functions which I mentioned (include string.h). But you shold post your code for more asistance, becouse forum members can't understand clearly what problem you dealing...
Forum: C Sep 4th, 2006
Replies: 4
Views: 2,896
Posted By andor
Don't understand. The user must enter numbers or chars? Both? To copy chars to buffer you can use for example memcopy or better memmove
Forum: C Sep 1st, 2006
Replies: 3
Views: 1,318
Posted By andor
First of all fflush(stdin);won't do the work!
Read this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044873249&id=1043284392) and this...
Forum: C Sep 1st, 2006
Replies: 50
Views: 8,408
Posted By andor
Just a small corection. Instead of

fscanf(Contactbook,"%s %s %s %s %s ",contactbook.names, contactbook.birthday, contactbook.hp, contactbook.address, contactbook.occupation);
...
Forum: C Aug 31st, 2006
Replies: 50
Views: 8,408
Posted By andor
First of all delete all fflush(stdin) in your code. Instead of first fflush(stdin) in Add func type

while ((ch = getchar()) != '\n' && ch != EOF);

declare ch as int. Read this...
Forum: C Aug 31st, 2006
Replies: 50
Views: 8,408
Posted By andor
Check this link (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351)
Forum: C Aug 30th, 2006
Replies: 5
Views: 9,048
Posted By andor
> how about std::accumulate?
Don't remember this C statement :)
Forum: C Aug 28th, 2006
Replies: 15
Views: 4,282
Posted By andor
#include <iostream>
#include <cstdlib>
#include <string>

using namespace std;
void decToBin(int number, int base);
int numOnes = 0;

int main()
{
Forum: C Aug 24th, 2006
Replies: 18
Views: 4,203
Posted By andor
I can't belive it. How is this possible :)

for (int x=0; x<strLength; x++)
{
if (0 == (x % 4) && 0 != x)
putchar(' ');
putchar(str[x]);
}
Forum: C Aug 24th, 2006
Replies: 15
Views: 4,282
Posted By andor
This is illegal. What did you want with this line?
Forum: C Jun 24th, 2006
Replies: 11
Solved: while loop
Views: 3,884
Posted By andor
This is just an idea how can solve your problem


#include "stdio.h"
#include "pthread.h"

pthread_t threadEvent;
unsigned char breakLoop = 0;

void * Exit(void * ptr)
Showing results 1 to 37 of 37

 


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

©2003 - 2009 DaniWeb® LLC