Hi,
I was going through GNU documentation for make/Makefile, and was studying about MAKEFLAGS variable. The document said "The options `-C', `-f', `-o', and `-W' are not put into MAKEFLAGS; these...
Type: Posts; User: poornaMoksha
Hi,
I was going through GNU documentation for make/Makefile, and was studying about MAKEFLAGS variable. The document said "The options `-C', `-f', `-o', and `-W' are not put into MAKEFLAGS; these...
You have not initialized the selection variable
int main () {
int num_players, selection, user;
...
...
and you are using it in do-while loop
Which means that the function checks if the integer myInt is a power of 2 or not.
I agree with Click_here. Not using brackets could be the potential issue. Can you post your complete code?
Understand bubble sort here
void Display_Info(clock_num, wage_rate, clock_hours, overtime_hours, gross_pay)
You need to mention the types for all the function parameters in here. Otherwise default types would be assumed...
Sorry Buddy..I am still not able to understand what are you upto. You better rephrase it.
Whaaaat? Whats the use of having num%1 ??
1. fgets() return string on success, and NULL on error or when end of file occurs while no characters have been read.
You cannot compare the return of fgets() with EOF. So apply the change...
What you can do is that whenever you start/restart this phonebook program, read all the entries from 'hehe.txt' (if exists) into the link list and then perform all the operations on this link list....
Yup, I am also a bit curious as to where TC2.0 is being used now a days??
I created a couple of hard links to original file. Then executed the code to delete the original file. The file was deleted from the directory but hard links were able to show the content of the...
Hi,
I went through the documentation of unlink() function. I believe that if there are multiple links to a file then calling unlink() to delete that file should just decrease the link count of...
Thanks a lot guys for your quick help!!!!
I got the answer!!!
So, Does this mean that the call to main() is decided dynamicly? ie the compiler first parses the way we have defined the main() function in our code and then sets up the call to main() function...
@Jim
Sorry I saw your reply a bit late. Thanks for the reply. If this is the case then I assume that main function is always called with two (or three) arguments. Now, suppose I have defined main()...
@Jim
Sorry I saw your reply a bit late. Thanks for the reply. If this is the case then I assume that main function is always called with two (or three) arguments. Now, suppose I have defined main()...
Hmm.. I am sorry but I am still confused. I believe that the prototype of the main() function has to be present somewhere as we are only defining it. Or, is it so that our definition of the main()...
According to my knowledge, there are following two valid prototypes for main() function in C :
int main(void)
int main(int argc, char *argv[])
Now, If i try to create two functions with same...
I did not get you.
I have compiled my C program and then executed it, that's how I told that whats happening and as far as the binary 'hello' is considered..it is also present...
Hi,
I want to write a C program that can launch an executable in a new shell different from the controlling shell. So what I did is :
1) Used the system("gnome-terminal") function to launch a...
I got it working by doing some modifications :
//cpp code
#include<iostream>
#include<stdio.h>
extern "C" {
Hi,
I have been understanding how to call C/C++ code from C++/C. Firstly I tried calling a C function from C++ code :
// cpp code
#include<iostream>
extern "C" {
Ok. Got it. :o
Actually I was trying to find the difference between bus error and segmentation fault and was looking for some code that could produce bus error. I did find one but then could not...
Ok, but then why is it giving a bus error? Why not a 'segmentation fault' is being thrown??