Posts
 
Reputation
Joined
Last Seen
Ranked #297
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
88% Quality Score
Upvotes Received
38
Posts with Upvotes
32
Upvoting Members
26
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
4
17 Commented Posts
1 Endorsement
Ranked #858
Ranked #607
~104.07K People Reached
Interests
Everything
PC Specs
Obsolete
Favorite Tags

155 Posted Topics

Member Avatar for Charlton21

Whenever I want to optimize a program, I usually start by trying to map the entire problem mathematically, simplify it, then re-code the simplified formula. I don't have time right now to look at your code, but maybe that bit of advice might help you.

Member Avatar for lernik
0
736
Member Avatar for pvbhargav

[QUOTE=cse.avinash]pleaser close this thread its too old(4 yrs) now.....[/QUOTE] Normally I would say the same thing, except that most of the "bump" comments were praising the information on this thread. While that isn't adding anything useful to this thread, it takes effort to browse Google, find this information, and feel …

Member Avatar for Sun_5
-1
15K
Member Avatar for yhh

Why don't you take the printScreen function out of MDAnalysis.c and move it into driver.c after the main function. It could fix your problem perhaps.

Member Avatar for Sean1234$
0
14K
Member Avatar for Rahul47

Setting global environment variables are OS specific, and are essentially managed by the OS itself. The OS is responsible for passing on the default environment values to new process spaces. Therefore you will want to refer to your Operating system's requirements. In [Windows](http://best-windows.vlaurie.com/environment-variables.html) it is stored in the system registry. …

Member Avatar for N1GHTS
0
220
Member Avatar for N1GHTS

Say I have code like this... typedef struct { unsigned A:1; unsigned B:1; } FlagStruct; extern FlagStruct *Flags; Imagine that the Flags instance is a shared resource in a multi-threaded application. Say thread #1 decides to read the value of Flags->A but thread #2 decides to set or clear Flag->B …

Member Avatar for N1GHTS
0
244
Member Avatar for zegarnek

You may be suprised how heavily used console interfaces are used in these modern times. I work with them and build them on a near daily basis in Linux for high end modern enterprise software. As much as I love building things from scratch, I also consider the value of …

Member Avatar for N1GHTS
1
3K
Member Avatar for pittdaniweb

Que: What is the exact difference between the "for" loop and "while" loop in C language ? Ans: About 20 lines of code. [I][B]Ba-dum-PSS![/B] *Insert laughter Here*[/I] [url]http://www.codingunit.com/c-tutorial-for-loop-while-loop-break-and-continue[/url]

Member Avatar for rajii93
0
814
Member Avatar for boomboombugsh

I looked up the word "plz" in the dictionary and it does not exist, especially not one with that many letter "Z"s. Note that the question in this thread has already been answered 2 years ago. Why can't you use that code as a starting point?

Member Avatar for iqra liaquat
0
225
Member Avatar for Rahul47

Just a quick word of advice. It is more efficient to use fwrite() or fputc() instead of fprintf() for writing characters to a file one at a time. This is because fprintf() needs to parse the format string whereas fwrite() and fputc() does not. This only matters if you plan …

Member Avatar for Rahul47
0
190
Member Avatar for symon_1

These instructions assume you want to read it to memory and that the letters are being converted into numbers of equal size (1 byte): 1. Open the file for reading 2. Create a string array large enough to store the contents of the file. 3. Iterate through each character of …

Member Avatar for Rahul47
0
238
Member Avatar for vibhu mishra

Note that system() returns a program status code. It is good practice to use this value for error handling.

Member Avatar for cgeier
0
345
Member Avatar for Rahul47

I believe Labdabeta answered the first question well. As for your second question you can technically do this... const *p = (const *)0x05; // Constant pointer address char *a = (char *)p; // Assign this address to a character array printf("%p", a); // View the address of the character array …

Member Avatar for Banfa
0
205
Member Avatar for Rahul47

Integer has nothing to do with pointer size. The pointer is the size of the memory address as dictated by the Operating System based on the CPU's capabilities. A 32 bit CPU will have a 4 byte address whereas a 64 bit CPU will have an 8 byte address. Some …

Member Avatar for Ancient Dragon
0
231
Member Avatar for H_beginner
Member Avatar for L7Sqr
0
252
Member Avatar for Rahul47

Its funny to think that c=(--a)+(--a); is not any more efficient than --a;--a;c=a+a; in terms of how it compiles. Its just that the first version is ambiguous in design as (--a) acts as a function with a side effect rather than as a variable in an algebraic formula. Ever since …

Member Avatar for N1GHTS
0
413
Member Avatar for shakin

I'd start over from scratch with this strategy: 1. Load the entire file into an array of strings. Create a new line for every newline character found. Don't bother with scanning it or doing anything else other than load those lines into memory. If you do this then it lessens …

Member Avatar for N1GHTS
0
260
Member Avatar for kristina.densmore

Pseudo code, Flow charts, etc are nothing more than a human legible medium to stage the logic so that it can then be translated into code. For instance you can translate this human readable line... **Ask the user for a floating point number** into this code... printf("Prompt: "); scanf("%f", &Variable); …

Member Avatar for cgeier
0
480
Member Avatar for shaneetra.graham

I'm curious if your shell is merely echoing commands to another shell. What does this shell do with the commands it receives? Are they translated into a system API or some library? Knowing this would help in deciding the best way to manage the command history.

Member Avatar for N1GHTS
0
130
Member Avatar for Van_1

I will disagree with Acient Dragon on this one. DOSBox runs native DOS games pretty well, so you have to ask youself "what am I doing differently than these other DOS programs"? I haven't programmed in DOS in forever so I can't say exactly whats wrong, but to just give …

Member Avatar for N1GHTS
0
406
Member Avatar for kent.johnstone_1

This is illegal unless you are working on an embedded system or a very low tech system that only works with 1 byte addresses: typedef BYTE SOCKET; And unless you are reinventing the wheel you should not be actually defining a typedef for SOCKET. Its defined in your socket library …

Member Avatar for kent.johnstone_1
0
330
Member Avatar for Renesme-LuCiFeR

I just want to add that DaniWeb has an often neglected "search" feature which you might find handy. I did a search just now for your question and found literally over 1,900 results! You should definately follow myk45's advice and learn the language grammar thouroughly before you embark on any …

Member Avatar for Ramesh.YoTLC
0
238
Member Avatar for N1GHTS

I am importing some C code into a C++ compiler, specifically Borland C++ Builder 5. I seem to have a problem with this style of code: // A structure that contain's itself typedef struct AnObject AnObject; struct AnObject { AnObject *Object; }; // A global structure to store a pointer …

Member Avatar for N1GHTS
0
243
Member Avatar for peter20

If you know any [URL="http://www.ubuntu.com/"]linux[/URL] scripting, you might be able to write a simple [URL="http://www.freeos.com/guides/lsst/"]batch script[/URL] utilizing the [URL="http://linux.about.com/library/cmd/blcmdl1_diff.htm"][B]diff utility[/B][/URL] which outputs the difference between two files. The [B]diff[/B] utility can ignore white spaces and non-typeable characters making it quite ideal for the job. You may write the script to …

Member Avatar for L7Sqr
0
302
Member Avatar for robinpurbia

There is no excuse not to say anything in a help forum. We are not robots: we don't communicate in code. If you are not comfortable with the English language, its okay. We will not criticise your speech. But you must explain yourself, otherwise you are just spamming the site.

Member Avatar for zeroliken
-1
110
Member Avatar for BITnur

Next time you post code, use the [ CODE ] Tags. The code you posted is terrible. Not only is it highly inefficient but the variable names are undescriptive and there are no comments anywhere to be found. Either way, the "count" variable is apparently used to store the number …

Member Avatar for BITnur
0
238
Member Avatar for engineer61

> [B]now three variables we printed to a file received from the user. This variable to another file, the user wants to take that file and the value of the variable is a variable, you need to do. And this event is the first change the variables in the file …

Member Avatar for zeroliken
0
138
Member Avatar for randolph.gamo
Member Avatar for randolph.gamo

If you have any specific questions from the book, you should ask them here. We would be happy to help you. It is not the nature of DaniWeb to give out answers, especially instructor's manuals.

Member Avatar for N1GHTS
0
112
Member Avatar for coding101

You could always use a library like [URL="http://www.libsdl.org/"]SDL[/URL] (its portable) and lets you capture the keystrokes and mouse of the computer without displaying anything.

Member Avatar for N1GHTS
0
99
Member Avatar for amit_as

[QUOTE=amit_as;1696555]how to find the position of a particular character in a given string in c[/QUOTE] Show an attempt at trying to do this yourself. It is more useful then just asking for the answer.

Member Avatar for nHulk
0
6K
Member Avatar for vivosmith

Sounds like your library installation is broken or you have not set up your compiler/linker environment properly. These problems are usually easy to fix with a little persistence. Make sure you read all installation instructions carefully for the library, specifically the part about integrating with your platform's IDE or compiler. …

Member Avatar for N1GHTS
0
237
Member Avatar for ramki*89

This is a less complicated way to do the same thing... [CODE] int a=320; printf("%d",(char)a); // Only return the first byte of the integer using a cast [/CODE] "Type Punning" as in your example is best used for random access of said bytes. [CODE] int a=320; char *p; p=(char *)&a; …

Member Avatar for N1GHTS
0
91
Member Avatar for Santi1986

I usually create a structure (with malloc'd arrays if required) and either define the function with that typedef or as a void pointer. Void pointers are a powerful way to pass literally anything to a function, but usually in those cases you need to also pass some enum or int …

Member Avatar for Narue
0
350
Member Avatar for amnakhan786

I haven't studied your code in detail, but I should point out that you should never create static buffer array's with arbitrarily large sizes. This is especially true for a function that deals with files. Instead, define a pointer and use malloc/realloc/free to manage its size dynamically so you can …

Member Avatar for Adak
0
220
Member Avatar for Santi1986

[QUOTE=Santi1986;1698103]got it...storing the next node in temp...copy data of next node to this random node data field....[/QUOTE] Impressively written! So robotic, so exotic.

Member Avatar for N1GHTS
0
96
Member Avatar for The 42nd

This is a simple implementation of a switch-based scientific notation parser I came up with. I put lots of comments in there so you can build upon it and do more with it. I have tested it and it works fine with all your example inputs. [CODE]double ScientificToDouble(char *in_String) { …

Member Avatar for TrustyTony
0
2K
Member Avatar for BabiesGame

Here are a few approaches to your described problem: 1. Write a program in assembly that uses Operating System API facilities or Graphic libraries to draw to the screen (As Ancient Dragon described) 2. Write a program in assembly that writes directly to the monitor by writing directly to video …

Member Avatar for N1GHTS
0
1K
Member Avatar for MrNo

C is not FORTRAN: It is not "made for mathematics". C is a system programming language, and as such, you must understand that it can't magically figure out what relationship your functions [B]f()[/B] are to each other by context. To make this work in C, as [B]WaltP[/B] explained, you must …

Member Avatar for N1GHTS
0
1K
Member Avatar for timetraveller92

Explained is the standard in the industry. It is also the general philosophy of successful application programmers. As a perfectionist, I have a loyal customer base due to them knowing that I don't follow that philosophy. Being a perfectionist also makes you older faster and less financially successful in the …

Member Avatar for WaltP
-2
190
Member Avatar for sgtlaugh

I would recommend that you use the [URL="http://www.imagemagick.org/script/binary-releases.php?ImageMagick=6t1724la0l35ojifcsr311hr15#windows"]ImageMagik Library[/URL] in Windows to get image properties. It supports practically every image format and will convert image types to a raw image format on the fly so that your image viewer program can support all those image formats. Read their documentation on …

Member Avatar for N1GHTS
0
258
Member Avatar for neeraj goswami

Here you go! [CODE] #include <stdio.h> int main(int argc, char** argv) { printf("Hello World\n"); return 0; } [/CODE]

Member Avatar for N1GHTS
0
157
Member Avatar for niyasc

The better question is: Can anyone HELP me with the logic to solve common emitter biasing of a BJT? Logic is language independent. With that said, use this open source Java applet to help you with an accurate BJT simulation: [url]http://www.falstad.com/circuit[/url] The source code is available on the site.

Member Avatar for N1GHTS
0
123
Member Avatar for Tenjune

You are also missing details from your question, and it could be interpreted many ways: 1. A function that will display all the vowels from the string in the order used. 2. A function that will display all the distinct vowels from the string. 3. A function that will display …

Member Avatar for N1GHTS
0
76
Member Avatar for jackc121

If what you mean is that you want to fill list[0][0] through list[0][9] with 5.35f, then use a for loop and assign 5.35f to each int from 0 through 9 on row 0.

Member Avatar for jackc121
0
172
Member Avatar for Aman6o

Because [B]b[/B] is being passed a new instance rather than a reference pointer. You can fix that like this: [code] #include <stdio.h> main( ) { int a[5], i, b = 16 ; for ( i = 0 ; i < 5 ; i++ ) a[i] = 2 * i ; …

Member Avatar for N1GHTS
0
92
Member Avatar for tayler

[QUOTE=tayler;1651408]make a program that have a password before you wiil enter the main menu and in the main menu there is 4 sub menu ....plz help me.......plzzzzzzzzz[/QUOTE] 1. You should have made a new thread and provided a link to this post in your thread since you are requesting something …

Member Avatar for N1GHTS
0
133
Member Avatar for untio

You could do it with this: [url]http://itextpdf.com[/url] It's free, powerful, and highly flexible. You should read their book to know how it works, but there is plenty of resources on the internet.

Member Avatar for N1GHTS
0
188
Member Avatar for soundar
Member Avatar for N1GHTS
0
120
Member Avatar for kittu.kishore

I am pretty sure you are using the wrong term. In C, if a function's return value is expected but not properly returned, the register that normally contains the return value will contain an undefined value which is basically whatever the register has in it before it left the function. …

Member Avatar for N1GHTS
0
223
Member Avatar for chezkaty

Instead of flipping the number, save the number in reverse so it can be automatically printed in the reverse order.

Member Avatar for Narue
0
159

The End.