Gcc Definition and 14 Threads
-
C program could not be compiled and executed at Windows command prompt
/* 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...- WMDhamnekar
- Thread
- Gcc Program Windows
- Replies: 14
- Forum: Programming and Computer Science
-
GCC warning: function may return address of local variable
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...- m4r35n357
- Thread
- Function Gcc Local Variable
- Replies: 16
- Forum: Programming and Computer Science
-
A
Help in telling compiler to include header files for C
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...- Atr cheema
- Thread
- C programming Compiler files Gcc
- Replies: 27
- Forum: Programming and Computer Science
-
G
Fortran Solving Function Problem in Code Exchange
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...- Galizius
- Thread
- Fortran Fortran90 Function Gcc
- Replies: 8
- Forum: Programming and Computer Science
-
G
Fortran [Fortran] How to loss different random number
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...- Galizius
- Thread
- Fortran Fortran90 Gcc Loss Random Random number
- Replies: 2
- Forum: Programming and Computer Science
-
G
Fortran [Fortran] Filon's method Fourier Transform
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...- Galizius
- Thread
- Fortran Fortran77 Fortran90 Fourier Fourier transform Gcc Gfortran Method Transform
- Replies: 6
- Forum: Programming and Computer Science
-
G
Fortran Why Isn't My Fortran Bisection Code Finding the Root?
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)...- Galizius
- Thread
- Formula Fortran Fortran90 Gcc
- Replies: 6
- Forum: Programming and Computer Science
-
T
Using GCC to generate makefile dependencies.
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...- TylerH
- Thread
- Gcc
- Replies: 1
- Forum: Programming and Computer Science
-
R
GCC XL20/600 Printer: Upgrading Resolution to 800/1200
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...- ricardo_s
- Thread
- Board Gcc
- Replies: 2
- Forum: Electrical Engineering
-
W
Trying to compile a function with pointer to structure as return value with gcc
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...- Werg22
- Thread
- Function Gcc Structure Value
- Replies: 2
- Forum: Programming and Computer Science
-
W
How Can You Redirect scanf to Read from a File in GCC?
I have a code which uses scanf. How do I make the compiled code read from a (text) file instead from user's input?- Werg22
- Thread
- Gcc
- Replies: 5
- Forum: Programming and Computer Science
-
C
C/C++ GCC & C++: Allocating Large Arrays in Windows
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...- CRGreathouse
- Thread
- Arrays Gcc
- Replies: 13
- Forum: Programming and Computer Science
-
N
C: ctype_base.h errors with gcc 4
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...- neurocomp2003
- Thread
- Errors Gcc
- Replies: 5
- Forum: Programming and Computer Science
-
News The pros and cons of global warming; i.e. GCC
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- Ivan Seeking
- Thread
- Gcc Global Global warming
- Replies: 10
- Forum: General Discussion