3,892 Posted Topics
Re: Here is an extract from K & R C programming Tutorials [quote] A file is opened by a call to the library function fopen(): this is available automatically when the library file <stdio.h> is included. There are two stages to opening a file: firstly a file portal must be found … | |
Re: For encoders and decoders of the popular image standards [URL="http://www.colosseumbuilders.com/sourcecode.htm"]http://www.colosseumbuilders.com/sourcecode.htm[/URL] And the whole opensource image processing library suite in C++ is available at [URL="http://cimg.sourceforge.net/"]http://cimg.sourceforge.net/[/URL] Hope it helped. Bye. | |
Re: If by musical note u mean a beep then it can be done using [code] for (int i = 0; i < 20; ++i) prinf ("\7"); [/code] will sound the beep 20 times. If u mean musical notes like piano and the likes then maybe an external sound library would … | |
Re: Please post the code using tags. char* number = new char[20]; cin>>number; c.postfix(number); // use fuction postfix to convert and this is my postfix fuction void Calculator : Postfix(char* item) { // give variables meaningful names // instead of "item" , "expression" would have been a better choice // the … | |
Re: Just getting the source code copied from any website is not much of an achievement, it would be better if you do a reality check and start learning C++ from ground up , from beginner to advanced and you will automatically figure out the answers to your questions. Sorry if … | |
| |
Re: It would be really good if u could post the data file so that we can run the prog and see wat actually is the problem rather than assuming somethings. Also if u are using C++ y not use [inlinecode] string [/inlinecode] instead of character arrays. Bye. | |
Re: It would be really good if u could post the actual requirement ur code is supposed to satisfy and ur actual effort rather than making us do the guesswork. That way u can get more help. | |
Re: The only problem with ur code is that u are passing parameters to the function [inlinecode] fillRectangle ( ... ) [/inlinecode] in the wrong order ( yes u heard it right WRONG ORDER). The first call to [inlinecode] fillRectangle ( ... ) [/inlinecode] should [B]not be[/B] [inlinecode] fillRectangle (board, 0, … | |
Re: Hmm... I think that the lines of include code [code] #include <gl\gl.h> #include <gl\glaux.h> #include <gl\glu.h> [/code] should actually be [code] #include <gl/gl.h> #include <gl/glaux.h> #include <gl/glu.h> [/code] Try this and see if this works. Bye. Regards, ~s.o.s~ | |
Re: [quote=joshilay]char s[]="the cocaine man"; int i=0; char ch; ch=s[++i]; printf("%c ",ch); [/quote] You pre increment the value of " i " which now becomes 1 and u access [inlinecode] ch = s [1] [/inlinecode] which is 'h' the second char of the array. [quote] ch=s[i++]; printf("%c ",ch); [/quote] This time … | |
Re: holidayCopy is a character array and i think holidayList[i].holiday is a char variable of the DayData class. You are trying to assign a character to an array which is illegal. Maybe this is wat u are lookiing for : [inlinecode] holidayCopy[i] = holidayList[i].holiday; [/inlinecode] Hope this helped, Bye. | |
Re: [quote=rapt0r]Thx that worked but now i want to put a string in a class i tryed this Didnt work[/quote] I have highlighted the section which you forgot towrite or had wrongly written. Try this [code] #include <iostream> #include <string> class Name { string myname; public: Name(); ~Name(); void print(); }; … | |
Re: Refer to the sticky "Starting C" which gives the links to OPengL tutorials which is a third party API for 3D graphics purposes. [URL="http://www.daniweb.com/techtalkforums/thread50370.html"]http://www.daniweb.com/techtalkforums/thread50370.html[/URL] | |
Re: I think the [inlinecode] _fopen [/inlinecode] you are talking about is actually the inner implementation of [inlinecode] fopen [/inlinecode] as present in [inlinecode] stdio.h [/inlinecode] given by [inlinecode] #define fopen(__file, __mode) __fopen((__file), -1, (FILE*)0, (__mode)) [/inlinecode] Hope it helped. Bye. | |
Re: [B]Error Returning a local variable [/B]You are gettin this error since you are trying to return worker type array "w" which is local to the function and hence is destroyed when the function exits. Said simply the scope or the effect of the local variable is in the function itself … | |
Re: Dude see the input u have given, its 41 hrs and the rate per hour is 10. So do the simple math, normal rate = 41 * 10 = 410 overtime = (41 - 40) * 1.5 * 10 = 15 total sal = 410 + 15 = 425 ? … | |
Re: As for inbuilt GUI support offered by the language, JAVA would be good option and in many ways its similar to C++. Using SWINGS in java is a piece of cake and you can get a host of tuts on the net for that. Also Python can be used for … | |
Re: Thanks for the feedback and i would really appreaciate if everyone would post any links to resources which are useful for C programmers so that they dont have to go any further than this thread. | |
Re: Where is [inlinecode] fINPUT [/inlinecode] anywhere in your code ? It would be really better for the others to understand if you post the entire code or the module so that we can be of some help. Hoping to hear from you. Bye. Regards, ~s.o.s~ | |
Re: I dont know a lot about handling internet protocols using C++ and MFC but i think this should help you a bit. [URL="http://www.codeguru.com/cpp/i-n/internet/generalinternet/article.php/c3411/"]http://www.codeguru.com/cpp/i-n/internet/generalinternet/article.php/c3411/[/URL] Waiting for your feedback. Bye. | |
Re: This basically depends on where you want to focus : 1) If you want to orient your thinking in the programing direction without worrying about the resistance offered by the language (which obvioulsy is a feature of C and C+++) then you would be best off starting off with PYTHON … | |
Re: Here is one of the best with some egs along with the reference to understand. [URL="http://www.cppreference.com"]http://www.cppreference.com[/URL] Hope it helped. Bye. | |
Re: Buddy you have got too many errors hanging out there in your code and even your logic is a bit wrong there. >>> [code]strcpy(f[i],f[i-1]);[/code] strcpy is used to copy contents from one character array to another. IF you just want to change the char value y not use the assignment … | |
Hell "o" to all programmers out there. I was just fiddling around with pointers to [inlinecode] const [/inlinecode] when i wrote this snippet. [code] [COLOR=#008000]int main (void) { int* ptr = NULL; const int i = 20; ptr = (int*) &i; *ptr = 40; printf ("\nThe addr of the const … | |
Re: Please try and understand the code given below and ask if you have doubts regarding it and try to write the code once again on your own. Maybe this is what you were looking for : [code] [COLOR=#0000ff][/COLOR][COLOR=#000000][/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <stdio.h>[/COLOR] [COLOR=#0000ff]const[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]float[/COLOR][COLOR=#000000] flatfeeone = 500.00; [/COLOR][COLOR=#008000]//flat rate for up to … | |
![]() | Re: Yes, thats it even i tried it. Good one dave ![]() |
Re: [quote=vikter]Hi all, I would some help in C++ (Files) and in web design using php[/quote] Please elaborate your problem stmt since it is really very fuzzy right now. Which help do you exactly need, in PHP or in C++? | |
Re: [quote=ethompson]Hello, I'm having some problems with trying to get my random numbers to go in ascending order and descending order as well and trying to figure out how to get when I put in a number between 2 - 25 how to get the highest number out of the random … | |
| |
Re: I think this prog solves the prob of both the original poster and Mr. Dilip. Hope this helps. If any portability prob or any other prob in the code then let me know. [CODE] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <stdio.h>[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] <ctype.h>[/COLOR] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] main()[/COLOR] { [COLOR=#0000ff]char[/COLOR] a[26]; [COLOR=#0000ff]int[/COLOR] i; printf("Enter the string: "); fgets(a, … | |
Re: Maybe the below link can solve the problem of stray "\n". Hope it helped. [URL="http://www.daniweb.com/tutorials/tutorial45806.html"]http://www.daniweb.com/tutorials/tutorial45806.html[/URL] | |
Hello to all developers out there. Just wanted to know if i can embedd my existing VB application in a browser window so that when the link is loaded the application runs and accepts the input from the user. If it is possible i would really be grateful if you … | |
Hello all prorgammers out there. While just fiddling with the pointer concept of mine which is weak i wrote a very simple function to just give the addr of the array to the char type pointer so that i can refer the array using the pointer instead of the array … | |
Here is the code i have written to accept string from the user. Can you please modify the code so as it can even count the space as well as print the whole line with the spaces instead of the first word. Thanks a lot. [CODE] #include <stdio.h> #include <assert.h> … | |
Re: [quote=dwks]That only generates 99 numbers. You should have "i<100".[/quote] Nope i think it is alright since he has initially assigned the first element of the array with the value from [INLINECODE]cin >> array[0];[/INLINECODE] and the remainig 1 to 99 elemets get assigned values from the statement [INLINECODE] for (int i=0; … | |
Re: [quote=jbuzz120]I added some stuff and it blows up after I enter the 5th person. Sorry to be nagging but I am just lost. I have been going through the tutorials today and still a little lost. I appreciate the help I have got so far though. Not sure it's my … | |
Re: [quote=iamthwee]c++ has strong string handling capabilities.[/quote] Well as far as i know Python also has real good string handling capabilities and i guarantee far better than C or C++ since it is somewhat based on the concepts of PERL. (is it?) | |
Re: No point in learning OpenGL and Direct X since they are extensively for Engine Developers which is i hope wat u dont want to be since it requires ground breakin concetps and requires years of work before you can make your own engine. Better use 3rd party game engines like … | |
Hello to all progg. out there. The sample prog. i have written is of which i am facing three doubts : [CODE] char *someFun1() { char temp[ ] = "string"; return temp; } char *someFun2() { char temp[ ] = {'s', 't','r','i','n','g'}; return temp; } int main() { puts(someFun1()); puts(someFun2()); … | |
Hello to all coders out there. I have a doubt regarding the format "long double" which is producing wierd results when used in the case of a factorial program. When "long double" used with C lang. produces the output input = 3 factorial = -2.000000 while when used with C++ … | |
Re: Hy dude .... Here are some ways to do this.... http://www.codecity.org/forum/login.php good luck...:) Please refrain from resurrecting dead links and see the posting date before posting a solution. Maybe the mod would now close this thread. |
The End.