18,491 Topics

Member Avatar for
Member Avatar for Mr Violent

Hey there, I'm having a problem with the WAVEFORMATEX format, and setting my primary buffer's format. My code is below: [code] void ErrorBox(string strMessage) { MessageBox(NULL, strMessage.c_str(), "Error", MB_OK | MB_ICONEXCLAMATION); return; } bool DSPlayer::SetPrimaryBuffer() { if (lpDS == NULL) { ErrorBox("Direct sound not initialized."); return false; } ZeroMemory(&dsBufferDesc, sizeof(DSBUFFERDESC)); …

0
69
Member Avatar for dilip.mathews

Hi all, What is the effficient way to check whether a single linked list is looped somewhere.The number of nodes in the list is not known. In that case traversal of SLL will go into an infinite loop. One solution I have is to store each address of node in …

Member Avatar for dilip.mathews
0
107
Member Avatar for Sealteam56

[COLOR=#555555][COLOR=#000000]Hello all,[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]I had posted earlier for help, but the post was so deep in an older thread do not think anyone will find it.[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]so here goes,[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]I am in a class to learn C and was tasked with writing a program that …

Member Avatar for Sealteam56
0
152
Member Avatar for kraze_101

i have an assignment at school where we have to get a string entered by a user and then the program is supposed to encrypt it by adding 13 to A-M and -13 from M-Z so that if i inputted A B C i would get N O P. Basically …

Member Avatar for ~s.o.s~
0
216
Member Avatar for madhan

[COLOR=black]Thank you so much for looking at my question and helping me to get start. I am new to programming. I am currently executing c/c++ programs in VC++ compiler all by my own. I have created very basic programs like displaying the content, find the entered number is odd or …

Member Avatar for Member #46692
0
132
Member Avatar for aeinstein

Hi All, I've converted the [URL="http://www.daniweb.com/techtalkforums/thread49412.html"]pseudocode from this thread[/URL] into a flowchart, and I'd greatly appreciate if anyone can point out any errors and/or inefficiences in the represented coding. as posted in the above referenced thread, the flowchart represents a solution for a chapter exercise, as follows: "The problem states …

Member Avatar for Member #46692
0
379
Member Avatar for -jOHn BeneDict-

[code]#include<stdio.h> #include<conio.h> main() { float x,y,z; clrscr(); printf("\nThis program calculate if you are Underweight,Healthy or Overweight"); printf("\n\n Enter your weight in kilograms:"); scanf("%f",&x); printf("\n\n Enter your weight in meters:"); scanf("%f",&y); z=((y*y)/x); if(z<20){ printf(" the Quetelet-index is: %f",z); printf("\n\n\tUnderweight"); } else{ printf("\n the quetelet-index is : %f",z); printf("\n\n\tOverweight"); } getch(); return …

Member Avatar for Zababa
0
151
Member Avatar for chillharsh

as the title suggest i like to swap two numbers but the thing is that i should not use 3rd variable that is doing the whole stuff only with 2 variables so plz any body help me out

Member Avatar for sukhi
0
499
Member Avatar for Laiq Ahmed

I've gone through several books they explain Upcasting as Base class pointer pointing to Drived class Object this definition is correct. Downcasting: [quote]Drived class pointer pointing to base class object..[/quote] i got a bit confused.....not having crystal clear image in my mind..... if the above definition is correct... whats wrong …

Member Avatar for Dave Sinkula
0
229
Member Avatar for joydeep1

My C program for making a database which stores data and from which data can be retrieved is stated later.But I am not able to write the function for editing the stored items correctly.Please suggest a method.Also suggest :[B]1.mode in which file is to be opened in case 2 of …

Member Avatar for ~s.o.s~
0
122
Member Avatar for jatinder kumar

double new_amount; printf("enter new_amount:"); scanf("%lf",&new_amount); printf("Amount entered is%lf",new_amount);

Member Avatar for server_crash
0
119
Member Avatar for php111

hi, I'm new here and i like this site. Anyway, how do i program in HTML, CSS, PHP, MYSQL, C, C+, C++, whatever i would need to know and what can i use it in when i'm done learning? Thanks. Bye.

Member Avatar for GriffIT34
0
168
Member Avatar for sgriffiths

Hello if i have a file residing on a unix machine, how do i get the stats of the file, ie date stamp of file, and username of file. Best Regards

Member Avatar for Rashakil Fol
0
108
Member Avatar for chillharsh

i kow c up to a good level but i have question for which i am anable to find solution that is to find greatest of 2 numbers in 'c' without using 'if' condition can any one help me out

Member Avatar for dilip.mathews
0
114
Member Avatar for amitkumar2982

Hey Guys, Please help me. I have been trying to code this from the past 2 years. I wish to code the Flat real mode by switching to Protected mode and then switch back to the real mode. I want to do this on a P4 1.8GHz Machine with a …

Member Avatar for Dave Sinkula
0
255
Member Avatar for DavidB

Hi, folks. Just joined these forums. They look pretty busy and seem to cover a lot of ground so I thought it would be worthwhile to join and contribute where I can. A little about me: I am a self-taught hobbyist programmer. Never been paid to program, but am pretty …

Member Avatar for happygeek
0
47
Member Avatar for aeinstein

Hi All, The following problem solution has given me fits!!!:mad: The problem states that a library records monthly book withdrawls, capturing the Library of Congress Number, Author and Title, for each month (sorted by the Library of Congress Number for each withdrawl). The initial problem required the merger of the …

Member Avatar for Member #46692
0
546
Member Avatar for joshilay

can anyone please tell me why following output is generated ... int i=10; printf(" %d ",i++/i); // output=0 i=10; printf("%d",i/++i); //output=1 i=10; printf("%d ",i++/++i); //output =0 i=10; printf("%d",++i/i); //output=1

Member Avatar for joshilay
0
217
Member Avatar for joshilay

hi .. if anyone cn plz tell me wht will be the output of following code n how dis output is generated ... float i=10; printf("i++/i %f\n",i++/i); printf("%f \n",i); i=10; printf("i/++i %f \n",i/++i); printf("%f \n",i); i=10; printf("i++/++i %f \n",i++/++i); printf("%f \n",i); i=10; printf("++i/i %f \n",++i/i); printf("%f \n",i);

Member Avatar for joshilay
0
118
Member Avatar for kakeen

Recently, I was assigned a program that needs to be able to do the quadratic equation. I use this code [code] X = ((B*B) - 4*(A*C)); X1 = (sqrt(X)); X2 = 0-X1; X3 = X1/(2*A); X4 = X2/(2*A); Y = (-B + X3); Z = (-B - X3); Y1 = …

Member Avatar for DavidB
0
131
Member Avatar for jitterson
Member Avatar for jitterson
0
123
Member Avatar for paramveer

Hello group, Could anyone of you tell me how to convert string to const char* in C ....function c_str() is not working ...i dont know why............ Thanks...

Member Avatar for Narue
1
136
Member Avatar for joydeep1

I am trying to prepare a database using C,which can store data and from which data can be retrieved and edited. [B]First storing,then retrieving data from the file works.But,during first run of the prog if choice#2(i.e.,DISPLAY)is entered without entering any data using choice#1(although the file contains data),then error occurs,gets hung.A …

Member Avatar for joydeep1
0
118
Member Avatar for deadprogrammer

Hi everyone I am really having trouble right now with oracle for linux. Please tell me how to connect oracle using c/c++ in linux. If anyone knows about any tutorial or have code, please plzzz post me that as well.

Member Avatar for WolfPack
0
176
Member Avatar for kris.c

I need to use the FFTW to generate fourier transforms. The "fftw-3.1.1 " has been installed already and it is in the location "/compiler/ fftw/fftw-3.1.1"..the "fftw3.h" is in this directory. In my program I have # included the exact path to the ".h" file. Still none of l the FFTW …

0
81
Member Avatar for sgriffiths

Hello I am trying to write data to a file. When writing "STEPHEN", only STEP is written, can anyone help? below is my code fp = fopen(filename, "rb+" ); fseek(fp, final_seek_pos, SEEK_SET ); fwrite(update_record, sizeof(update_record),1 ,fp ); fclose(fp);

Member Avatar for sgriffiths
0
174
Member Avatar for nileshdalvi

Hey i am outta my wits to get the folowing output in C. Can ne1 help O/p reqd: * * * * * * * * * * * * * * * and so on. see th pyramid is not the desired one when you open this post.go back …

Member Avatar for dilip.mathews
0
98
Member Avatar for jatinder kumar

Hi,My name is Jatinder Kumar from India(Punjab).I have done B.Tech. in Electronics & Communications Engineering.Iam interested in software programming .I have also interested in hardware.

Member Avatar for Dani
0
50
Member Avatar for geethanjali_t

hi , need help in solving the flow shop scheduling problem using dynamic programming

Member Avatar for Salem
0
62
Member Avatar for jitterson

What is the difference between “overloading” and “overridding”? This one of my interview questions? I am expecting answers for interview not for assignment any help?

Member Avatar for WolfPack
0
94
Member Avatar for dev.cplusplus

Explination: Ever notice how the URLs of search engines and other sites are cluttered with % symbols and other numbers? This is known as URI encoding, which is simply % signs followed by nonalphanumeric characters that have been converted to their hexadecimal values Hi to all, I have the following …

Member Avatar for dev.cplusplus
0
328
Member Avatar for white dragon
Member Avatar for Fasola

What's the difference between Static and Dynamic Memory Allocation and what are the advantages and disadvantages of them both?

Member Avatar for samaresh
1
598
Member Avatar for huffstat

I am starting a new project and a couple of tips would be helpful. I wish to read all the files in the Windows Favorites Folder or Directory and extract the link information. I know how to read the files once I have the name of the file. What I …

Member Avatar for huffstat
0
128
Member Avatar for bigdill

Could anyone tell me the function this program is using? [code]#include <iostream.h> #include <stdlib.h> void My_Name_Is() int main() { My_Name_Is() //Calls function that prints user's name }[/code] Thanks!

Member Avatar for jim mcnamara
0
77
Member Avatar for sgriffiths

Hello I am trying to write some data to a certain position in a file, but cannot get it to work I want to write "XX" to position 6 of a specified file, but the data is just being written to the end of file. see below [code]#include<stdlib.h> main() { …

Member Avatar for sgriffiths
0
2K
Member Avatar for Ricky_v.s_C++

How can I separate an integer into digits using for loop? eg. before: 123 after: 1 2 3 anyone can help me with that?

Member Avatar for Ricky_v.s_C++
0
428
Member Avatar for mrjaiswal

Hi All, I am new member of this forum. I am trying to implement the simple c logic for the following problem : I want to come out of a [B]while[/B] loop only when I press the key 'e' But [B]condition is that, it should not wait for me to …

Member Avatar for spaceboyz87
0
212
Member Avatar for Tester99

Hi All, When I build a solution, it follows error: fatal error LNK1136: invalid or corrupt file [I]If anybody can provide a key how to fix this, please reply[/I]

Member Avatar for Dave Sinkula
0
56
Member Avatar for squirrel

Hi, I have a program which is hard coded, I need to enter a value(n2 in the below code) in the program, and the program processes the file according to the value n2. how I compile now is as follows: cc -o test testprog.c ./test [filename] What I need to …

Member Avatar for squirrel
0
297
Member Avatar for thlegendkiller

good day, I am an incoming 2nd year IT student and am encountering a problem in creating a "turtle graphics"(from the famous Logo Language) program using C. This case is found in the book of deitel and deithel, "C how to program" in the chapter of Arrays. it has almost …

Member Avatar for Dave Sinkula
0
1K
Member Avatar for dilip.mathews

Hi Everybody, Myself Dilip over 24 years of age from India, Kerala (Gods own country - atleast some of u might be knowing). Currently working as Software Engineer in Honeywell Tech Sol Lab - India. Topics of intereset - C and Operating Systems. Best Wishes, Dilip Mathews.

Member Avatar for happygeek
0
48
Member Avatar for ~s.o.s~

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 …

Member Avatar for ~s.o.s~
0
129
Member Avatar for molayos

I have xml strings in a memory in C program. I need to extract the reponse tag. Any known xml parser or string extractor code out there that works?

Member Avatar for Member #46692
0
115
Member Avatar for kishore22

Hello, I need the logic to implement a stack by using two queues. can anybody help in this ? Thanks & regards, Kishore

Member Avatar for Narue
0
127
Member Avatar for Lun

<Post moved from dead [URL="http://www.daniweb.com/techtalkforums/thread22835.html"]thread[/URL]> is it possbile if the string letters can be alternatively capital? like uhmm ex. boring to a bOrInG? and without using the any str?

Member Avatar for Lun
0
110
Member Avatar for ~s.o.s~

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> …

Member Avatar for Ancient Dragon
0
188
Member Avatar for neeludhiman

Hi, Can anyone please tell me where can I fing the C code for Base64 decoding. I have a string that is base64 encoded, and I have to decode it, how can I? Thanks, Neelu.

Member Avatar for Dave Sinkula
0
99
Member Avatar for rhp405

Hi! I'm trying to find out what is wrong with the next code which I'm trying to run in Linux: [code] int e1; int e2; pid_t pid1; // pid of child pid_t pid2; pid_t w1; // return code of wait() pid_t w2; // child process 1 pid1 = fork(); if …

Member Avatar for rhp405
0
2K
Member Avatar for jeffxiang

Hello, ostream - how to insert a line of text instead of overwrite in the beginning of the file? #include <fstream.h> int main() { char fileName[] = "SampleFile"; char buffer[255]; ofstream m_fp; // m_fp.open(fileName, ofstream::ate ); m_fp.open(fileName, ios::in|ios::out); m_fp.seekp(0, ios::beg ); m_fp << "This is the line written to the …

Member Avatar for jeffxiang
0
457

The End.