- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 19
- Posts with Upvotes
- 17
- Upvoting Members
- 12
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Very fluent in the C coding language. Always up for a challenge, and always learning.
- Interests
- Shell Scripting
- PC Specs
- [Pentium 4 3.0Ghz] [1GB DDR2 RAM] [NVidia GeForce 6600 PCI x16] [Triple 18" LCD Monitors] [Windows…
112 Posted Topics
Re: Greetings chound, C provides [b]typedef[/b], a facility for creating new data type names. It makes your name a synonym of the defined data-type: [code][color=blue]typedef int[/color] Number;[/code] The type Number can be used in declarations and casts in exactly the same ways that the defined type [b]int[/b] can be: [code]Number i, … | |
Re: Hello, If I understand correctly, you want to replace all space occurances to "\[color=green]space[/color]" where [color=green]space[/color] represents the space, ' ', character:[code][color=red]sed[/color] [color=#CC3200]-i[/color] '[color=blue]s/ /[/color][color=green]\\ /[/color]' [color=purple][i]file[/i][/color][/code] To clarify: [color=red]sed[/color] — Is the program. [color=#CC3200]-i[/color] — Is a sed option that can edit files in place (makes backup if extension … | |
Re: Greetings kisseric, Try changing the line:[code]if (newEntry == 0) { [color=red]doDivideZero(double &);[/color] }[/code]To:[code]if (newEntry == 0) { [color=green]doDivideZero(displayedVal);[/color] }[/code]Once I did this, your program ran just fine. I compiled it in Dev-C++. - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Greetings, This process is not hard since the default libraries included a function to do this. It's called itoa(). [b]»[/b] [color=blue]char[/color] *itoa([color=blue]int[/color] value, [color=blue]char[/color] *buffer, [color=blue]int[/color] radix); Converts an integer value to a null-terminated string using the specified radix and stores the result in the given buffer. If [i]radix[/i] is … | |
Re: Greetings suptboyr, Good to see you have an idea of how this process works. Creating a program to use mathematics in C is not difficult what so ever. It's similar to the syntax of how you write it on paper, but with easier calls. [b][u]Convert minutes to [hours and minutes][/u][/b] … | |
Re: Greetings, Using a 2-Dimensional array isn't very difficult at all. In fact for simplicity, lets take a look how a 2-Dimensional array looks in all aspects. [code][color=blue]int[/color] myValue[2][3];[/code] We know this array is going to be a 2x3 rectangle. So lets see how this looks: [code]Rows/Columns Column 0 Column 1 … | |
Re: Greetings cblue, > does anyone know hoew to find a prime sumber of a single number inputed by the ser using the following function and printing out if the number is prime Yes, I do know, its quite possible too.[code][color=blue]int[/color] main() { [color=blue]int[/color] num; cout << "enter number:"; cin >> … | |
Re: Greetings, In Java, all methods use the throw statement to throw an exception. The throw statement requires a single argument: a throwable object. In the Java system, throwable objects are instances of any subclass of the [url=http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html]Throwable[/url] class. If you attempt to throw an object that is not throwable, the … | |
Re: Hello, I would recommend [url=http://www.bloodshed.net/devcpp.html]Bloodshed Dev-C++[/url] for C++ programming. If you want to compile C code, I would suggest using a C compiler such as GCC. I'm un-aware of any free available IDE envrionments for the C language. Though you may be able to compile C code in Dev-C++. I've … | |
Hello, [font=courier new][u]Brief Tutorial Revision[/u]: All examples can be compiled successfully in your compiler. Also, each example is compatable using the [b]-Wall[/b], [b]-pedantic[/b], [b]-ansi[/b], and [b]-std=c89[/b] GCC flags. Also, a few paragraphs have been modified, and code examples improved. Previous tutorial, Pointers #2, has been combined in this revision.[/font] [b][u]Introduction[/u][/b] … | |
Re: Hello, I have not done TCL script programming before, though I do believe the following links can help you: [list] [*][url=http://www.beedub.com/book/]Practical Programming in Tcl and Tk[/url] [*][url=http://hegel.ittc.ku.edu/topics/tcltk/]Tcl/Tk Information[/url] [*][url=http://www.techiwarehouse.com/Tcl_Tk/Tcl_Tk_Tutorial.html]Tcl/Tk Tutorial[/url] [*][url=ftp://ftp.tcl.tk/pub/tcl//doc/TclTkElRef803.pdf]TCL Electronic Reference[/url] *pdf file [/list] I can provide additional links if need be. - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
I've heard the curses library can be useful when trying to implement the handy DOS-only tools of gotoxy() and clrscr() using move() and initscr(). Though, there is a way to write your own gotoxy() in the Linux environment. This topic isn't touched often, so I would like to change that. … | |
Re: Not declaring a function's return value is an error in C++, whether the function is main or not. In C99, the October 1999 revision to Standard C, not declaring a function's return value is also an error (in the previous version of Standard C an implicit int was assumed as … | |
Re: Hello, [quote=Fasola]Hmmmmm....in the function multiply() how did you go from parameters x and y to i and j, that looks like a "call-by-reference" but i don't understand why you did that and how it works[/quote][b]»[/b] One aspect of C functions may be unfamiliar to programmers who are used to some … | |
Re: Greetings, [b]»[/b] Any ideas why I can't include it? It sometimes depends. [b]fstream[/b] is part of the C++ standard, [b]fstream.h[/b] isn't. [b][u]The difference between fstream and fstream.h[/u][/b] [b]fstream[/b] is somewhat more restrictive than the older [b]fstream.h[/b]. One would possibly avoid problems by careful use of namespaces, but it would be … | |
Re: It's not free anymore sadly, though a link that is still alive contains version 1.2f, I believe, can be found here: [url]http://members.lycos.co.uk/comicrealm/[/url] [url]http://tsa.clancore.net/[/url] - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Greetings, String parsing isn't always an easy task. Especially in cases where you need to split a single string into a great multitude, but also accounting for maximum performance. The following code presented does this task simply. Using precise allocation techniques perform greatly when writing an algorithm to precision. | |
Re: Greetings kppowell, I'm glad you have asked this question. Here is a detailed explanation between the differences of the two languages: [b][u]Differences between C++ and Java[/u][/b] Although the Java language is modeled on C++, it has several fundamental differences. It is important to keep in mind (for now) one fact: … | |
Re: Greetings Mahen, I have some useful links I believe might interest you. · [url=http://www.icynorth.com/development/createdlltutorial.html]How to create a DLL[/url] · [url=http://www.codeproject.com/dll/]DLL Reference Page[/url] · [url=http://www.boondog.com/tutorials/dlltutor/dlltutor.htm]Other DLL Tutorial[/url] I hope you find this information useful. - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Greetings Ragnarok, Notebook computers can be easily overheated. Here are a few reasons why: For Windows users, there may be a process running in the background that eats up alot of the CPU. When this happens, your computer thinks harder causing it to overheat. The [b]svchost.exe[/b] issue did that to … | |
Hello, I am experiencing a slight problem managing user accounts in Windows XP Home Edition. When running in an existing account, non-administrative, I run into an IE script error and am unable to view the User Accounts dialog found under Control Panel. I am unable to run as Administrator unless … | |
[b]eFax Messenger Plus — What Really Happened?[/b] To be honest, I don't know what really happened to the software. I recently discovered that [url=www.efax.com]eFax[/url] no longer supports the eFax Messenger Plus software and that it has ceased to be made available to the consumer from both eFax and [url=www.j2global.com]j2 Global … | |
Yes, This is possible, and I have a working prototype that is simple to use. Though, before I display it I wanted to publicly ask the board where I should really post this. The "Windows" nor the "Software" section seemed suited for this topic, so I turned to the last … | |
Hello, I am trying to determine the best possible solution to accomplish a simple, yet complex task. ([i]Regarding: Socket Programming[/i]) I've been working on a new project for quite some time and have written a custom framework from the ground up. It's more or less a ([b]Client --> Server --> … | |
Hello fellow programmers, This is a tutorial about using pointers in the C environment. Please, don’t hit the back button; pointers aren’t as hard as you think. In fact without pointers, most of us would be lost in our latter programming years. Even though pointers are for the experienced, as … | |
Re: Welcome to the forums, I have written a program called "Conversion" a while back. It does exactly what you are looking for and more: [list][*]Decimal to Hex [*]Hex to Decimal [*]Hex String to Decimal [*]Decimal to Binary [*]Binary to Decimal [*]Float to Binary [*]Ascii to Binary [*]Binary to Ascii[/list] It's … | |
Hello, I beleive I found a suspicious file on my machine used as an [i]explorer.exe[/i] shell. I've been trying to remove it all day, with no luck. Below is my HJT Log: ---------------------------------- Logfile of HijackThis v1.98.2 Scan saved at 11:16:48 AM, on 5/9/2005 Platform: Windows 2000 SP4 (WinNT 5.00.2195) … | |
Re: Greetings kisseric, Welcome to DaniWeb. Gain help, Gain trust. :) Enjoy! - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Hello, [quote=kloony]for(i=0; i<1000; i++) QUEUEinit(50);[/quote] If I am correct in my thinking, you will have lost allocated memory in your program. Your pointer, [b]q[/b], is a variable. Allocating memory to it 1000 times will cause a problem. According to the C89 Sec. 4.10.3: [font=courier new]The pointer returned if the allocation … | |
Re: Hello, I'm not very fluent in Win32 programming, though I might be able to point you in the right direction. Below are a list of links that may help you: [list] [*][url=http://www.codeproject.com/treectrl/qfilter.asp]A checkbox tree control for use in filtering selections[/url] [*][url=http://secure.codeproject.com/treectrl/vtree.asp]Tree control with bitmap checkboxes supported[/url] [/list] Hope this helps. … | |
Re: Hello there Elmo! Welcome to DaniWeb. I'm sure Dani will be around to say hi soon. :D So welcome and have fun. - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Hello, When free() is called, a block of memory previously allocated by a call to malloc, calloc or realloc is freed:[code]Graph G=malloc([color=blue]sizeof[/color] *G); [color=#008800]/* Memory is dynamically allocated */[/color] [color=blue]if[/color] (G != NULL) { [color=#008800]/* G successfully points to an empty block of memory */[/color] [color=#008800]/* Do task here */[/color] … | |
Re: Hello, I have viewed and compiled the source files without warnings or errors with Visual C++ .Net 2003. I did not see main() declared in either of your two files, as I added it manually during my build. Would you mind sharing the precise error and what's your current compiler? … | |
Re: Hello, You're on the right path, though your syntax is a bit off. We know that sed substitutes text using the [color=green]s[/color] command. Suppose you wanted to change all occurrences of "Unix" in the text to "UNIX":[code]# Substitute Unix with UNIX [color=red]sed[/color] '[color=brown]s[/color][color=green]/Unix/UNIX[/color]' [color=purple]intro[/color][/code]Where [color=red]sed[/color] is the [i]program[/i], [color=brown]s[/color] is … | |
Re: Hello, The [font=courier new]switch[/font] statement is a multi-way decision that tests whether an expression matches one of a number of [i]constant[/i] integer values, and branches accordingly. The [font=courier new]break[/font] statment causes an immediate exit from the [font=courier new]switch[/font]. Because cases serve just as labels, after the code for one case … | |
Re: Hello, C provides the infinitely-abusable goto statement, and labels branch to. Formally, the goto statement is never necessary, and in practice it is almost always easy to write code without it. The goto statement was once widely used. Unfortunately code that used goto extensively was poorly structured and could easily … | |
Re: Hello, This is quite simple in fact. We will run one loop through 8 times for simplicity. Each loop around we will increase a single variable that will tell us where to stop. Here is our example:[code][color=blue]#include[/color] <stdio.h> [color=blue]int[/color] main() { [color=blue]int[/color] i, j, k, temp; [color=#008800]/* initialize j */[/color] … | |
Re: Greetings, The [b]if-else[/b] statement is normally used to express decisions, where the [b]else[/b] part is usually optional. Since an [b]if[/b] simply tests the numeric value of an expression, coding shortcuts are possible: [code][color=blue]if[/color] (expression) [color=#008800]// instead of[/color] [color=blue]if[/color] (expression != 0)[/code]Example 1.1: Using coding shortcuts There is an ambiguity when … | |
Re: Heh, Very funny prog-bman. :) As for you Nabs, the definition of your nick is intriguing: Apprehend [url=http://www.google.com]Google[/url], not Giggle, is your friend believe it or not. Just do searches for C or C++ structure examples, etc... It's not that hard. Trust me. - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Ah, I'll see what I can do about the contests. Maybe something a little simpler than my previous two contests ;) - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Greetings, A simple fix I saw. In your function gettemps() change:[code]scanf("%f",temp[i]);[/code]To"[code]scanf("%f",[b]&[/b]temp[i]);[/code]if If you want to store the result of a scanf operation on a standard variable you should precede it with the reference operator, i.e. an ampersand sign (&). - [color=#CC3200]S[/color]tack [color=#CC3200]O[/color]verflow | |
Re: Greetings, There are a few syntatical errors in your program. Let's walk through them one step at a time. [b][u]Point A[/u][/b] First issue is the local variables themselves. Nothing major, it can be fixed. Let's look at what we have:[code][color=blue]const[/color] price*=sales_tax_rate, price of item, sales_tax, total;[/code]Alright, this may cause a … | |
Greetings, Pointers are facile, yet confusing. Thinking in the programming world isn’t easy, and comprehending everything read, intricate. This tutorial leads from the previous, which may clarify many doubts in the previous segment. You have learned most, if not all, of the basics pertaining pointers in the previous tutorial. Here, … | |
Re: Greetings, Thinking on the same line, lets walk along the string. Better yet, lets use a while loop to do so. By creating a seperate function to modify the string would probably be beneficial in this case. If we send the string to another function, we can treat it like … | |
Re: Well, Here is the problem right here:[code]printf("ENTER ARRAY ELEMENTS:"); scanf("%d",&a[i]); fflush(stdin);[/code]So far you call scanf() onces only. Ask for one integer and send it to a[i]. So far [b]i[/b] is nothing. No loop, not even zero; or shall I say unitialized. For fflush(), there is no need to flush the … | |
Re: Greetings, There are a few typographical and syntax issues with your program. Firstly, lets look at the minor issues: * **Point A** int valid(update D) I'm guessing that **update** should be **udate**, hence the class. * **Point B** In your operator overload function `operator++()` one of your if statements have … | |
Re: Greetings, The algorithm may be off in some ways. I put some prints in the code to see what was failing or skipping and nothing showed up. Firstly the reason that your check of [b](x<s)[/b] will never pass unless [b]x[/b] is less that 0. Since [b]s[/b] is initialized to 0, … | |
Re: Greetings, There are a few issues with the program. Nothing major though. Firstly, frrossk showed the first issue. The new line should only take place after the first loop is continuing, not the second loop. Also, the lines of:[code]printf("%4d ",c[i][j]); c[i][j]=a[i][j]+b[i][j];[/code]Try flipping the two codes around:[code] c[i][j]=a[i][j]+b[i][j]; printf("%4d ",c[i][j]);[/code]It would … | |
Re: Greetings, [b][u]const keyword[/u][/b] Variables declared with ‘const’ become constants and cannot be altered by the program. [b][u]static keyword[/u][/b] The most commonly used and understood purpose of the 'static' keyword is to create a persistent variable. If you declare a variable as static (by putting the static keyword in front of … |
The End.