/* Write a c program to convert given number of days to a measure of time * given in years, weeks and days. For example 375 days is equal to 1 year * 1 week and 3 days (ignore leap year) */
#include stdio.h #define DAYSINWEEK 7
void main() { int ndays, year, week, days...
Yes I've already looked on SO! None of the answers contain the word "may". My story is that I am passing in references to global variables, modifying them, and returning them in array literals. I suppose it must complaining about the array literals (c99) rather than the variables themselves...
For a program to use I have to compile some .c files which include #include''header.h'' statements and I have tried different commands to compile but it gives me errors like 'No such file or directory'.
Here is start of my file named
#include "einterp.h"
while start of
file looks like this...
Hello I am trying to exchange following code into two functions which I will need to use in further programs.
The code is as follows:
do i=0,k
do j=0,k
if (i/=j) then
lj(i)=lj(i)*((xx-x(i))/(x(j)-x(i)))
end if
enddo
l(i)=l(i)+y(i)*lj(i)
write(2,*) x(i),y(i),l(i)
enddo
I would...
Hello I am wondering how can I make sure that every number which I am losing will be different? I am using the following code:
program lottery
implicit none
real(kind=4) :: x
real(kind=8) :: y
integer :: i, seed= 64256
call srand(seed)
do i=1,6
x=rand()
! to make the lossing interval...
I was told to do a Fourier transform of function by using a Filon's method. I have found the code but I don't know how to include any function to the subroutine. I would be grateful for any example of how to use this code.
SUBROUTINE FILONC ( DT, DOM, NMAX, C, CHAT )
C...
Hello, I was told to find the root of an integrand with using the bisection method. I am kind of new to such a stuff so I am kind of confused why I am not getting the expected result.
Here is my bisection code:
tl=3.0
tup=4.0
tempred=0.0
s=-0.234726128709272990292
do while (abs(total_calka)...
How do I use GCC to generate dependencies for makefiles? I tried using the -M option, like below, but I don't know how to insert the name of the .cpp into the shell command that calls GCC with the -M option.
%.cpp : $(shell gcc -M $<)
Instead of the desired effect, $< is replaced by nothing...
Hello guys,
I am trying to find a technical diagram for a GCC XL20 printer. I am trying to get the 600 resolution to go up to 800 or 1200. They all use the same engines but I can't find the firmware or the utility to backup and flash the rom. they are flashabe. The roms are intel E28F800B5B70...
I get an error with gcc "error: two or more data types in declaration specifiers" when trying to compile something of the form:
struct tag *function (...) { ...}
Apparently it won't let me create functions with return values pointers to structures. I know that it's perfectly valid code, so...
I'm having trouble allocating large arrays in C++ using gcc (using cygwin/MSYS in Windows). If I declare an array at the beginning of main as:
unsigned int arr[1000][1000]
there's no problem, but even something as small (8 MB) as
unsigned int arr[1000][2000]
will fail. This is...
Hi all,
I was wondering if anyone has ever run into ctype_base.h errors
like:
'<anonymous enum>' is/uses anonymous type.'
error: trying to instantiate 'template<class T> void operator|(PUP::er&, T&)'
some sites that i have visited
say its an error with gcc4
GUI-mandriva
sfwr-charm++ for...
It's going to be interesting to see how this all affects trade, politics, agriculture, navigation... and even travel.
Talk about irony!
http://www.timesonline.co.uk/article/0,,13509-2034643,00.html