19,876 Topics

Member Avatar for
Member Avatar for thehakan

I want to merge 2 linked list into 1. Is the code below ok? Can you Check please? [code] LIST Merge_List(LIST P,LIST Q) { HEADER h = P; NODEPTR ptr2 =Q; NODEPTR ptr1 = P; NODEPTR prev=P; NODEPTR temp=NULL; /* Second List Pointer */ while(ptr2 != NULL) { /* First …

Member Avatar for Narue
0
123
Member Avatar for AhmedHan

You know glVertex2f(), glVertex3f() and glVertex4f() functions have upper and lower boundaries of -1.0f and +1.0f. And, can you tell me what boundaries[INDENT]glVertex2d(x, y); glVertex2i(x, y); glVertex2s(x, y);[/INDENT]x and y parameters have for the functions above? And one more thing... What is the 4th parameter of glVertex4?() is for?

0
94
Member Avatar for neeludhiman

Hi I have FC4 installed on my machine. I am using Evolution as a mail client. I have to write a plugin for Evolution 2.2.2 in C language. Can you please tell me from where can I get an example plugin for Evolution 2.2.2? Or can you tell me what …

Member Avatar for Salem
0
87
Member Avatar for avik1612

I wanted a pragram in C showing the working of various CPU scheduling algorithms like SJF, Round robin.priority etc.

Member Avatar for Salem
1
167
Member Avatar for gampalu

Hi! I'm new in C++, but perhaps this is a general problem, not C++ exclusive. This is printed in my console, "-1.#IND", when using a printf, when this occurs? thanks

Member Avatar for Narue
0
248
Member Avatar for JoBe

Hello ladies and gents, I wanted to ask if any of you could help me out here, Ive got this program: [code] //Test programma voor Accelerated C++. #include <fstream> #include <iostream> #include <string> int main(int argc, char** argv) { int fail_count = 0; //for each file in the input list …

Member Avatar for JoBe
0
86
Member Avatar for Arvinth

Hi My problem reqs a simulation code ( *.exe), which shd read the inputs from a file ( *.in) and after calculations , write the results to an output file ( *.out) .The names of the input and output files are hardcoded. I shd be able to execute my sim …

Member Avatar for Arvinth
0
323
Member Avatar for chaitanya.b

hello every one, I am allocating memory using malloc library function, In oredr to deallocate memory we have to use free or realloc library functions.But I want to deallocate memory with out using free and realloc library functions, any body has the logic for that code please help me, it …

Member Avatar for SpS
0
152
Member Avatar for jcrcarmo

Hello everyone, I used to have my MS Access 2002 DataBase placed in my application folder and connect to it through an OLEDB connection. Everything worked fine. Now I decided to create an ODBC DataSource and suddenly I'm not able to pass parameters to the SQL Query the way I …

0
90
Member Avatar for osean

Can someone give me an example on how to listen on multiple ports with Winsock? I have been trying for hours with no luck..

Member Avatar for osean
0
594
Member Avatar for crws416

Hi all, I'm having a prob with loading a file into an array. I'm fine with opening the file but when it come to the fread command i seem to be failing as the document size will be variable, so how can i state a file size as "num_of_elements". if …

Member Avatar for crws416
0
163
Member Avatar for winbatch

I am trying to write a large file, but it always stops writing when it hits 2GB. (2147483647 bytes to be exact). I know it's not an O/S or disk issue (I'm on solaris) as I'm able to use the mkfile command to create a 3GB file. I'm using the …

Member Avatar for winbatch
0
203
Member Avatar for atrusmre

How do I find out (in a MFC app) if a "window" (or control) is enabled? (Please don't say "just run to program" because I'm looking for a way for the program to know :) )

Member Avatar for WolfPack
0
132
Member Avatar for augie0216

I'm doing this in visual C#.net.I'm a nwebie so bare with me. I'm creating a class I need to declare three fields: name,phone number, and birthday (month,day, and year). I'm not sure how to declare them. Is this correct :?: private string name private string phone number private int birthday

Member Avatar for f1 fan
0
100
Member Avatar for jcrcarmo

Hello everyone, Where exactly do I configure a C# application to install in a specific path? Like, for example: C:\Program Files\myApp Please note that I don't mean the deployment folder! I looked throughout the application properties, publish properties and publish Wizard, but didn't find a configuration option for that. Thanks …

Member Avatar for f1 fan
0
159
Member Avatar for ani_manit

Hi people, I am making a project in steganongraphy where I need to open a bmp file in C. Can anyone please help me with this because I am not really acquainted with manipulating bmp files in C. Can anyone plz help me in finding a code for this. Also …

Member Avatar for WolfPack
0
83
Member Avatar for hak

I know this is a noob question but where do i put my own code in this menu code for windows. [CODE]#include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int …

Member Avatar for bumsfeld
0
203
Member Avatar for narsimha.ram

Hi, I am working on a project that finds of the data cache behavior of a given c program containing loops. It calculates the cache hit ratio. Anybody having realted code please post it

Member Avatar for Salem
0
106
Member Avatar for squall8985

[COLOR=Green]1 John US [I]1234.00[/I] 2 Jessica Alba United Kingdom [I]23789.00[/I] 3 David UK [I]12.00[/I][/COLOR] Suppose i've this data in my txt file. How am i going to scan the file to get the deposit field(the one in italic) for each user? Thank you...

Member Avatar for Narue
0
256
Member Avatar for squall8985

Hello.. I've a question. Let say i've this in my txt type file with id field, name field, address field and deposit field :- [I]1 Jessica Simpson United Kingdom 5687.900000 37 Jennifer Anniston United States 7659.000000 4 Brad Pitt United States 87549.000000 9 Mike Shinoda United States 999865.000000[/I] How can …

Member Avatar for squall8985
0
216
Member Avatar for AhmedHan

Hello guys. I'm capturing the keyboard input using the class below. And I have no problem doing that. What I wanna ask is how to understand if a key is pressed, released or being pressed. Let me explain more... When ever any key is pressed the member function GetData() returns …

Member Avatar for WolfPack
0
398
Member Avatar for jcrcarmo

Hello to all, When I'm running my application from the debug folder, I'm able to save changes to the database, but when I load the Crystal report to display that data, it still displays the old data, i.e., the data before the changes. Does it have anything to do with …

0
100
Member Avatar for joshuatree

Hi all, I have a problem with my implementation of a unix shell, I'm hoping someone can point me straight... In my shell program, I collect and parse a user's entry from the command line and dump it into an array like `getopts()`. I then call `fork()` and `execvp(args[0],args)` (`(i.e. …

0
83
Member Avatar for jhdobbins

I must be missing something here. I am having trouble when I try to get an input. The numbers work fine, but once you get the correct answer, the area: [CODE]void tryanother() { char yorn; printf("Would you like to try another one? (y/n)\n"); scanf("%c", &yorn); if (yorn == 'y') getnum(); …

Member Avatar for Ancient Dragon
0
251
Member Avatar for egor

I need to write a program that takes in the values to a 4x5 two dimensional array of integers,then searches the array for values that are less than 0(zero)and displays these values along with there row and column indices.. Anyone have any ideas...newbie

Member Avatar for dwks
0
106
Member Avatar for vicky_dev

Hi, I want to write a function that coverts a double number into its rational form. For example if the input number in 4.33 I must get numerator = 433 and denominator = 100. Here is something I tried, it doesn't work because of floating point inaccuracy : [code] void …

Member Avatar for vicky_dev
0
135
Member Avatar for bemrag

hello everyone ı have a problem with writing the program #include <stdio.h> int main(void) { char desiredgrade; double score; double currentaverage; double weight; printf("Enter your desired grade"); scanf("%c,&desiredgrade"); printf("Enter your current average in the course"); scanf("%f,&currentaverage"); printf("Enter the final exam weight\n"); printf("as a percentage of the course grade"); scanf("%lf,&weight"); if …

Member Avatar for 830916
0
375
Member Avatar for robase

I have an Amusement Park Problem in C++ > Category > Children > Price $2.00 > The first child is always free > Category > Youth > Price > $8.50 > For every 4 tickets in this group one person is free. > Buy 4,get one free > Category > …

Member Avatar for Bench
0
698
Member Avatar for rasheed1982

how to optimize this code in c? int j=4,k=4; for(i=0;i<1000:i++) { j+ =i: k-=i: }

Member Avatar for Ancient Dragon
0
138
Member Avatar for apcxpc

Hi all My program currently loads a bitmap (given a filename) and draws it to a window (win32 application). The problem is that once a different bitmap is loaded and drawn to the window... if the new bitmap is smaller than the old bitmap, the edges of the old bitmap …

Member Avatar for Ancient Dragon
0
208
Member Avatar for thinhbk1802

Well, I have a small problem with checking the data type input by user. I want to make sure that the data got from keyboard must be "int" type. If User gives us another data types such as "char", "float, etc the program should report an error!!! :!:

Member Avatar for iamthwee
0
138
Member Avatar for Jon182

Hey guys I am using code like the following: But I would like to say if a semi colon appears at any stage after a ")" (closing bracket) add one to count. Any advice thanks. ( I am also using a char array and not a string, unfortunitly I have …

Member Avatar for Jon182
0
130
Member Avatar for anupam_smart

So, the question is simple... in 'C' we have calling conventions in FUNCTIONS. Why? why we cann't(don't) build compilers,libraries to make our own calling conventions like... func()(lr);-for left to right calling convention. func()(rl);-for right to left calling convention. :eek:

Member Avatar for Ancient Dragon
0
119
Member Avatar for winbatch

Is there a function that I can use that given a few vectors which elements are common to all? for example vector<int> a; vector<int> b; a.push_back( 1 ); a.push_back( 2 ); a.push_back( 3 ); a.push_back( 4 ); b.push_back( 2 ); b.push_back( 4 ); Something that will give me back the …

Member Avatar for Narue
0
126
Member Avatar for Sulekha

hiiiiiiii...........i want to access random lines within a text file in my program,plz help me!!!!!!!!!! :rolleyes:

Member Avatar for KorB
0
93
Member Avatar for jack223

How do i get from 2 character words to 4 character words or 5 character words?? can anyone show me how to do that plz... Q) Consider a language of words, where each word is a string of dots and dashes. The following grammar describes this language: <word> ::= <dot> …

Member Avatar for jack223
0
168
Member Avatar for brianotieno

Inheritance Create a class called Rectangle so that, given a height and width, the object would calculate and display the length, width, the perimeter, and the area. Do not include a constructor for this class Another class called Box is derived from the Rectangle class. This class given the breadth …

Member Avatar for Rashakil Fol
0
104
Member Avatar for jcrcarmo

Hello everyone, Greetings from Brazil! As shown in the code below, is it possible for me to add the new objects for tipoDT and sementesDT without having to do it one-by-one? Like, for example, getting the values automatically from the tables?.... How would I do that? The sementesDT table is …

Member Avatar for jcrcarmo
0
171
Member Avatar for Jon182

Hey guys I have been trying to expand the following code but have had no luck, is there anyway I could also make this code say if the previous character is space or a is comma? Thanks. [code] //temp is the array ch is a char pointer if( ch == …

Member Avatar for Ancient Dragon
0
234
Member Avatar for osean

im not sure exactly what its called or how to use it.. but im guessing its used to pass over variables as arguments to a function, ive only seen it in functions with this added after it: [B],...)[/B] somewaht similar to the code below.. [code]int myfunc(char *data,const char *data2[B],...[/B]) { …

Member Avatar for osean
0
169
Member Avatar for rgrwalker

I have an assignment of the following. Create a class named Fractions having two integer data members named for a fraction’s numerator and denominator. The Class’s default constructor should provide both data members with default values of 1 if no explicit user initialization is provided. The constructor must also prohibit …

Member Avatar for rgrwalker
0
182
Member Avatar for jcrcarmo

Hello everyone, Greetings from Brazil! Please help! I have a DataGridView in a windows form with three columns: Column1 is TipoComboBoxColumn Column2 is QuantidadeColumn Column3 is SementeComboBoxColumn I need the SementeComboBoxColumn to display values according to the value I select in the TipoComboBoxColumn. How do I go about accomplishing that? …

0
120
Member Avatar for btech

Below is my assignment. If I understand this correctly pivot as a median is the middle of the highest, middle, and lowest numbers. In this case 35 (14, 35, 72). Please correct me if I am wrong. I do not understand how to do part b. Could someone please explain …

Member Avatar for Narue
0
112
Member Avatar for Jon182

hey guys, I am using the following code to count from a text file but I also want to check for ",jo " as well as "jo " I was trying to do it by using while((ch = strstr( ch, "jo ")) != 0) || while((ch = strstr( ch, ",jo …

Member Avatar for Jon182
0
84
Member Avatar for harrypotter

Please tell me how to input password by showing a * or other symbol on console instead of text in C.

Member Avatar for agiorgio
0
126
Member Avatar for 111Help

Can someone offer assistance in converting seconds to minutes and seconds. :?:

Member Avatar for Lerner
0
124
Member Avatar for stackOverflow

Hi, These are some of the few questions for which i couldn't find answers. :lol: . I was just hoping if any of you can help me out. 1.Write a "Hello World" program in 'C' without using a semicolon. 2.Write a C++ program without using any loop (if, for, while …

Member Avatar for Bench
-1
320
Member Avatar for niceguy21
Member Avatar for Ancient Dragon
0
90
Member Avatar for ultra vires

I wanted to calcualte the execution time of Bubble sort or for that matter any loop . i tried using the clock funtion in c but it gives me 0 seconds for even 10000 elemnts being in the list :sad: .

Member Avatar for bumsfeld
0
153
Member Avatar for Acidburn

Hello, I'm wanting to know whats in the string and where: I've got this code [code] string s1="HelloWorld"; if(s1[5] = "W") [/code] now then if i want to know if World is in the string. I've tried doing: the if.... but it errors: [quote] : error C2446: '==' : no …

Member Avatar for Bench
0
194

The End.