19,876 Topics
![]() | |
Write C functions to perform the following tasks: Given a sorted double array x[i], i=0 to n and a double t, write a function which uses a binary search algorithm to find k such that x[k ยก 1] < t <= x[k]. Many thanks for your help! | |
For those of you who don't know, Daniweb has an IRC server. I'm there a lot, and I don't see any of you. That's not good because I'm there, of course. Real time chat with the resident guru ([B]shamless[/B]) will make you smarter ([B]utterly shameless[/B]) and cooler ([B]words cannot express … | |
/* I'd like to read some data from hard disk & then manipulate them as const variables. Here a simple version is attached. I do not know how to Initialize a const array by FUNCTION */ [code]#include <stdlib.h> #include <stdio.h> int *MAKE(const int n,int i) { int V[n]; V[0]=10*i; V[n-1]=2; … | |
Hi Does anyone know why the following code causes me a memory leak: [code]HGLOBAL hGlobal = GlobalAlloc( GMEM_FIXED, aJpegSize ); void* p = GlobalLock(hGlobal); memcpy((char *)p,imageptr,aJpegSize); GlobalUnlock(hGlobal); IStream* pStream = NULL; if ( CreateStreamOnHGlobal( hGlobal, TRUE, &pStream ) == S_OK); { if ( aPicture == NULL ) delete aPicture; aPicture … | |
Hello, im new to C and I'm stuck with a program. I now use this code to change some numbers [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #define relays 8 int main(int argc, char *argv[]){ int relay = 0; if (strtol(argv[argc-1], NULL, 10)) { if (strlen(argv[argc-1]) <= relays) { int a; … | |
Hi guys, How do you implement ACDSEE like file switching within a current directory using win32 Api. As in, in my project I am reading a "DICOM" file as input and now I want a way in which I can view the next file by just clicking on a "Button" … | |
[SIZE=3]I want to determine CPU usage of a application running in a windows Embeded NT platform.With regard to this i have already tried using Performance counter of the CPU to determine ,but its not working in Embeded NT..so..pls.. Can anyone help me out..its very URGENT... :!: [/SIZE] | |
Hello, I was wondering, does WSAAsyncSelect work for a console program? if so, how is this done? One of the parameters for WSAAsyncSelect is a window handle (HWND), but I don't believe a console application has a window handle. Thanks, | |
I have a char pointer here, [CODE] char* buffer = (char*)malloc(sizeof(char*)); *buffer = 1; buffer++; *buffer = 2;[/CODE] so by doing this, i actually have the pointer pointing to "1" and "2" what i actually want is the number, 12. anyone knows how can i get the char pointer's data … | |
string a = "A"; string b = "B"; string c = a + b; string d = "D" + a; string e = a + "D"; string f = "F" + "F"; Why is the last line not something the string class can handle if it can handle cases a, … | |
Now we are doing pseudocode and looping.On my assignment I believe i should do a sentinel controlled loop? But i really don't know.It says this: Develop an MC++ application that will determine if a department store customer has exceeded the limit on a charge account.For each customer,the following facts are … | |
I have to build a project. For that I am using an OWNER Drwan Menu. Now i want the small part of the remaining space to have an image. i.e a small logo in the top right corner of the application on the menu bar unused space. Now to dry … | |
I desperately need help on data type conversions. I am working on converting a set of codes in Visual Basic to C but i'm faced with a lot of problems dealing with strings. Can anyone help me out here? Below is the code I have in Visual Basic. [CODE]Private Function … | |
please can someone give me code how to reverse single link list using recurtion thanks | |
Is there any way to know the system date automatically using a c program ? If yes please guide me through some codes !! | |
Hi, I am having problems with the StretchDIBits function. The w->length contains the size of the jpeg. And the w->p contains a pointer to the begining of the jpeg data. Nothing displays onto the screen just a white box. Any Help would be really appriciated. [code]HDC dc = BeginPaint( hwnd, … | |
Hi Guys, I am writting some c++ code. And need to use the directx library to render images to the screen. For those you don't have a CPU speed problem(like I have) you can render jpegs images onto the screen in real time with Ipicture class. However I have a … | |
Hellow I'm just started whit C. I'm usig gcc and get this error: [CODE]test.c: In function 'main': test.c:8: warning: passing argument 1 of 'strlen' makes pointer from integer without a cast ..... [/CODE] This is my code: [CODE]#include <stdio.h> #include <string.h> int main(int argc, char *argv[]){ int arg = atoi(argv[argc-1]); … | |
this is an example of what is happening consider the program: #include<iostream.h> void main(void) { double x=2.3767553235; cout<<x<<endl; } when i compile it the output is only giving 2.37676 Why? I dont want only 5 decimal places,plz someone tell me why is this happening. i want it to be say … | |
Hi everyone, i am a student of IT and i am trying to read a text file and load it into a records of nested structs. I understand the logic how to do it, but i had a few problems. the txt. file contains : [code]John Smith 125 2004 Daily … | |
Hi everyone, i was hoping i could find some help here. I am trying to get settings i have written into a textfile to be put in an array. Here is what is in the txt file: 8 44100 1 2 1 I read the textfile with: pStream = new … | |
Hello, I need to allocate memory dynamically for arrays in FUNCTIONs (Here for R), but I can not use that memory in my main function Thank you so much [code]typedef float MYFLOAT; // or Called Standalone #define MYPRINT printf #define MYMAIN main #include <string> #include <cstdio> #include <cctype> #include <stdio.h> … | |
I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowcharts and don't have a clue. I need help. Create flowcharts and pseudo-code for the following problems: 1. You're trying to figure out where … | |
Can someone please help me on how to do the conversion of char to int using either a c-style cast or function-style cast. I have include my code. [code]#include <iostream> using namespace std; int main() { char state; cout << "Please select one of the following state abbreviations:\n"; cout << … | |
hi there is someone that can say me what kind of character from the COM1 when i connect eb600&eb500 to my laptop are them? i receive this kind of character รรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรรร | |
Sorry, posted this in the wrong forum. Original message content deleted. Posted here: [url]http://daniweb.com/techtalkforums/threadedpost127370.html#post127370[/url] | |
Is there a way I can put an image on the menu bar thing as shown in the image provided in the link. I have uploaded a snapshot of my project intending to show you exactly where i want the image to be. Please lemme know soon | |
hello guyz i wana implement ftp server using linux .. c based code is required plz help me out .. | |
Hi Guys, After devloping couple of years and months........many projects in .NET framework.....using C# , VB.NET, and ASP.NET.........My personal vote goes to C#. No doubt I love to code in this languages. And I know many of you like so... So then whether VB.NET Programmer getting downward.....I can't say so,, … | |
If your input is "abc". What would be the logic to accept the strings, bca,acb,bac,cab,cba,abc (ie. the same string with chars placed in any order) and reject all other input strings like aab, cdb, xyz etc ? Note: The reference string("abc") is not fixed, logic should work for any constant … | |
![]() | Hi, I am a systems engineer/administrator and therefore new to programming and wanted some help pls... I dunno how long it would take to program, if it could be done at all, but could someone please create a small program to vnc pcโs automatically or provide me with step by … |
pleaaaaaaaaaaaaaaaaaaaas i want the siluotion of this qustion b coz i have an exam after two dayes in pseudo-code and algorithems * write the pseudo-code to convert an arbitrary binary number to it's two complement representation and i need more exampels in this form about write the pseudo-code of any … | |
Hi, I'm working in C# Windows Forms, with an MDI system. My documents contain several different objects. I want those objects to be shown as dragable windows *inside* the document (MDI client) window, and to be part of that window (ie scroll with it, affect the scroll bars, etc). I've … | |
printf("\nThe Result is : %s %s %s %s %s %s %s %s\n",var[0],var[1],var[2],var[3],var[4],var[5],var[6],var[7]); while executing this i get correct result upto var[4].... and for var[5] and var[6] im geting some garbage valuess, then for var[7] im getg my result... whats wrong in my code..... | |
With the following line I get a syntex error relating to the ifstream file [code]if ifstream file(filename.c_str()).find string1 ++counter;[/code] I have already declared the input file and do not understand why there is an error. Sorry for seeming dumb but I am new to this!! | |
I would deeply appreciate it if someone can help me with this program because I have no idea how to do it and I need to get it done very soon. I appreciate any bit of help ,and thank you all _________________________________________________________________ Write a program that simulates rolls of two … | |
I'm searching for some resource script editor where can i make menus and dialogs and save it to the *.rc files. Just like one in Visual studio, but free. I found only editors exporting *.res files that are unusable (in Dev-Cpp). Do you use Visual Studio, or something else? Thanks … | |
I want to implement "whats this" functionality as seen in most of windows programs. For example -> When you right click on desktop and select properties and when u again right click on the properties dialog you get a pop up menu with "whats this". When i click on that … | |
Hi all, im new to this..... i want to send a doube to client...so im convt that to char and sendg that...it prits d exact value in server, but in client it doesnt print the decimal value... it just display like '123.' my code looks like.... [code] struct sockaddr_in server; … | |
Hello onces again to all of u I want to how can i get all the drives on a computer. It will very kind of u if u provide with a simple code.. Thanku | |
Hello, This is Bob from Bangalore, India. I have a doubt . I have a logo . I wanna display it in the project I made. But it is not happening. It worked ina a simple window program. But when I ported the same code in the below application which … | |
hi....can anyone pliz tell me how to go about converting numbers to letters on a telephone keypad...... eg when we txt..and suppose we type in 4663,we can get hood,home,good,gone....etc... got a project due!!!!!!!!! prefer it in C | |
Hey everyone, I am a true beginner programmer, in the crunch of finals week. I need to create a GPA calculator and I am having some difficulties. Anyone who can should help me!!! | |
Narue, would you give me the source? :?: | |
Hi, Can someone plz help me with copying the files contents into an array. the file contents maybe like... doit.dsp doit2.dsw doit3.cpp I want them to be copied to an array. Thank you | |
Hi Everyone, I was wondering if there's a way to write a program that tells console to do certain commands. I think you can do it by using a function and writing the CP command as a string for the arguments. Thanx in advanced for your help! | |
I am having trouble undestanding this code, can someone please help. I dont understand what the for loops do also. [code] void Merge( long array[], long left, long middle, long right ) { long i, j; long temp[MAX_ARRAY_SIZE]; for( i = middle + 1; i > left; i-- ) temp[i … | |
How to we provide context sensitive help using win32 api. I did not understand all theat topic ids and stuff in msdn. Is there any examples on the net. I am a .hlp file to which i wanna provide context sensitive help from my project. | |
Hi people, I am doing a project for my college. I am doing the UI part using Win32 Api. I am learing wuite a lot from various tutorials available on the net. I am through with most of the GUI but only get stuck when resizing of controls is required. … | |
I really need some help to finish my assignment which is due 2005/05/23 I have the other header and c files but i need to do some more work ........if u can help me i would be very greatful plzzzzzzzzz this is the code that follows for exptree.c #include "exptree.h" … |
The End.