Search Results

Showing results 1 to 40 of 60
Search took 0.01 seconds.
Search: Posts Made By: andor
Forum: C++ May 9th, 2007
Replies: 4
Views: 10,693
Posted By andor
First of all add code tags. Find out why void main and gets are bad. There is many posts about them.
Forum: C Apr 13th, 2007
Replies: 4
Views: 1,850
Posted By andor
link (http://c-faq.com/expr/ieqiplusplus.html)
Forum: C++ Jan 12th, 2007
Replies: 3
Views: 2,251
Posted By andor
C++ is a programming language and turbo C++ is a compiler.
Forum: C Oct 9th, 2006
Replies: 1
Views: 3,261
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,899
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++ Oct 2nd, 2006
Replies: 16
Views: 10,166
Posted By andor
Try to use sleep or usleep. I think that they are not standard functions but U can try. Use these func without including extra headers. The compiler will tell you that they are implicit declared. If...
Forum: C Sep 30th, 2006
Replies: 10
Solved: need some help
Views: 2,294
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: 6
Views: 4,683
Posted By andor
Change the constructor to

rectangle()
{
length = 1;
width = 1;
} //constructor sets length and width defaults to 1

or
Forum: C++ Sep 29th, 2006
Replies: 6
Views: 4,683
Posted By andor
Hm never seen that (probably becouse I'm not c++ programmer). But the book never lies. Make a test just leave the construtor and what will the copiler tell U
Forum: C Sep 29th, 2006
Replies: 10
Solved: need some help
Views: 2,294
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: 6
Views: 2,822
Posted By andor
And the question is?
Forum: C Sep 27th, 2006
Replies: 34
Views: 11,255
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,255
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: 5
Views: 5,665
Posted By andor
If you want help you need to post the whole code. Read this (http://www.daniweb.com/techtalkforums/announcement8-3.html)
Forum: C Sep 26th, 2006
Replies: 34
Views: 11,255
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,571
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: 6
Views: 1,846
Posted By andor
Did you tried cin.ignore after cin.get(ifname, 150); ?
Forum: C Sep 25th, 2006
Replies: 34
Views: 11,255
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 24th, 2006
Replies: 5
Views: 4,255
Posted By andor
The point is that you need to post some code. If you find some C++ program then try to convert it to C. If you have problems then post it.
Forum: C++ Sep 22nd, 2006
Replies: 3
Views: 1,284
Posted By andor
First of all your code doesn't compile without errors. Fix the errors.
Forum: C Sep 22nd, 2006
Replies: 34
Views: 11,255
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,381
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: 14
Views: 2,831
Posted By andor
Instead of double use long long.
Forum: C Sep 20th, 2006
Replies: 11
Views: 6,769
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: 5
Solved: Check Please!
Views: 1,444
Posted By andor
Why don't you use the compiler to check the code. Do you have question?
check.cpp: In function `bool checker(int)':
check.cpp:19: warning: control reaches end of non-void function
Thats after my...
Forum: C++ Sep 20th, 2006
Replies: 4
Views: 1,126
Posted By andor
You should go throught pointer tutorial.
OK *(ptarray[i]) is dereferenced pointer of ptarray[i]. Here is the deal.
ptarray[0] value is address of ar. When you dereference it you will have the...
Forum: C++ Sep 20th, 2006
Replies: 5
Views: 2,173
Posted By andor
Hm well on this forum you can get diffrent answers. The best way probably is to consult your teacher.
Forum: C Sep 20th, 2006
Replies: 7
Views: 5,393
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,055
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,074
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 18th, 2006
Replies: 5
Views: 2,907
Posted By andor
>then I might have to suffer a non-standardized design, which isn't a big deal
then use getch
Forum: C Sep 15th, 2006
Replies: 33
Views: 70,586
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,583
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,912
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,413
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,801
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,801
Posted By andor
Read this (http://en.wikipedia.org/wiki/Compatibility_of_C_and_C++)
Forum: C Sep 11th, 2006
Replies: 9
Views: 1,801
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 8th, 2006
Replies: 6
Views: 2,466
Posted By andor
Showing results 1 to 40 of 60

 


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

©2003 - 2009 DaniWeb® LLC