Hello everyone,
I have made a small code which reads a file and make multiple copies of it. The code compiles fine but when i run it i get a message
Assertion Failed
Expression: (stream !=...
Type: Posts; User: Ghost_
Hello everyone,
I have made a small code which reads a file and make multiple copies of it. The code compiles fine but when i run it i get a message
Assertion Failed
Expression: (stream !=...
I guess so..! :wink:
Hello guys..! I just restarted my PC and recompiled the code and now works..!!
I trully don't know what happened..!!!
Forgot to mention that the file is created by the function XfoilCall which calls xfoil(an external program) and then xfoil saves some data to the file save.txt.
After saving the data Xfoil exits....
Hello guys,
I have a function and i want to delete a file when the function is called and starts it's loop i have used this code but unfortunately the file is not deleted can you please specify...
Thank you that worked...!!
rcglr Thank you a lot for your help..!
The problem i have with the start command is that i want to start in batch mode. So that i want to feed the file airfoil.txt to the xfoil so that it reads...
rcgldr thank you for your suggestion..! Unfortunately as i can understand the commands are executed till line 2 where we call xfoil. Then i don't know why but it doesn't proceed to the ping command...
Hello guys,
In my code i call a batch file which runs an external program. The batch file open the program successfully but what i want is to close the program after a certain amount of time the...
Salem thank you for your suggestion...! It really helped me a lot
OK i changed the above while expression with this one
if ((fd = fopen(filename, "r")) != NULL) {
fseek(fd, 0, SEEK_SET);
while(fgets(buff,sizeof(buff),fd) != NULL)
...
Guys you were right the file isn't a fixed size but it has a standard form. So the fseek method to put the pointer at a specific place and then read from this point and below doesn't work very...
OK i finally found how to do it...!!! This is the code i use does anyone has any better suggestion...??
#include <stdio.h>#include <stdlib.h>
#include <string.h>
#include <math.h>
#define...
I tried to do something like you've said but i am getting very strange numbers this is what i came up with
double FileRead() {
double n[25],cl[25],cd[25];
char target[10]={"---"};...
Hello guys..!
What i try to do is to write a code which reads some specific values from a file and stores them in an array. My File looks like this
XFOIL Version 6.96
Calculated...
Salem thank you for your support...!! Since i believe that the problem might lie within the arrays of the rbspline function maybe... I wanted to ask you is there a way to dynamically change the size...
Hello Salem..!!
I changed my for loops as you proposed but now my spline function is calculating nan values..!!
This is my updated code can you please tell me why is that happenning cause i...
Salem Thanks a lot for reviewing my code...! I took your comments into consideration and i did this...
Actually my randval values doesn't produce so random values so i did some changes into the...
OK, but Xfoil is used in order to calculate the value of fitness function...!
Hello guys i have coded a GA which optimizes airfoil shapes. The problem i have is that the code runs fine untill generation 50 and then on generation 51 it crashes..! Actually the code is still...