19,876 Topics

Member Avatar for
Member Avatar for sileshi nibret

#include<iostream> using namespace std; struct node int data; node*next; }; node*head=0; void input_at_end(); void display (); void del(); int main(){ for(int i=1;i<=3;i++){ input_at_end(); display(); } del(); cout<<"\nafter deleting"<<endl; display(); } void input_at_end(){ node*temp; temp=new node; cout<<"enter data"; cin>>temp->data; temp->next=NULL; if(head==NULL){ head=temp; } else{ node*temp2; temp2=head; while(temp2->next !=NULL){ temp2=temp2->next; } temp2->next=temp; …

Member Avatar for Ancient Dragon
0
281
Member Avatar for Ghost0s

Hi i'm a newbie here & my questions are : 0- *what should i know to develop a library like the C standard library and if im thinking of building my own OS "im just dreaming" should i create a NEw C for it cause as we know C for …

Member Avatar for Ghost0s
0
331
Member Avatar for mcodesmart

I have a base class called Matrix which has a function transpose. I also have a derived class Matrix2 which is inherited publicly from Matrix class Matrix { public: Matrix(); ... Matrix Transpose(void); ... }; class Matrix2 : public Matrix { public: Matrix2(); ... }; In my main code, I …

Member Avatar for pappu.thakare.5
0
302
Member Avatar for celineshh

Can someone give me a hint on how it works? I'm working on a project and specific forms are only allowed to admins. For example there are forms 1, 2 and 3. forms 1 and 2 is only allowed to admins. Guest is logged in, and the button that redirects …

Member Avatar for arunkumars
0
1K
Member Avatar for Stefan_2

Okay. This weeks 'problem' is that I need to simulate a game. I have to make two singly linked lists which will contain a name of player, his attack (double/float) number and his defence number and so on for as many players as the user inputs. The point of the …

Member Avatar for Stefan_2
0
325
Member Avatar for Ace7z

This is my function UpdateWord. It searches for a word in the file and updates the word or the meaning void UpdateWord(void) { char srchWrd[30],choice,qtn='Y'; int x,y; dictio a, temp; FILE*ptr; do { printf("\nEnter Word to update: "); fflush(stdin); gets(srchWrd); x=strlen(srchWrd); for(y=0;y<x;y++) srchWrd[x] = tolower(srchWrd[x]); if((srchWrd[0]>='a')&&(srchWrd[0]<='i')) ptr=fopen("A-I.dat","r+b"); else if((srchWrd[0]>'i')&&(srchWrd[0]<'s')) ptr=fopen("J-R.dat","r+b"); …

Member Avatar for Ancient Dragon
0
176
Member Avatar for Sterben

Can anybody help me solve this case? there's an example input and output

Member Avatar for deceptikon
0
73
Member Avatar for prerit

Hello all!Im trying to write a program that accepts a string from users and then converts each character in the string to its corresponding 8-bit binary code and store it for further manipulation on obtained bit. I have the following code but it is not executing as expected : #include …

Member Avatar for deceptikon
0
331
Member Avatar for ballhysaledio

help with this PROGRAMM: Topic :The book of contacts Build a programm in C ,which saves in a text document the list of contacts /persons. Every contact should save an information for: 1.Name 2.Surname 3.the list of email(he can have a few addresses) 4.the list of the number of phones. …

Member Avatar for pritaeas
0
129
Member Avatar for newbie14

Dear All, I have a c# application where on normal I used a paper size fixed that is half letter(8.5 X 5.5). The problem now I want to design for a new paper size A4 but when I choose print it keep coming in the 8.5 by 5.5 size. Any …

Member Avatar for PRABHA1989
0
100
Member Avatar for XodoX

It's a server-client code. The client should wait for the server, and if there's no response, then send a new request. There's a 2 second wait. It's UNIX. I've been looking at some select() examples, but I'm not really sure... I found this example. #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> …

Member Avatar for iamthwee
0
161
Member Avatar for cambalinho

when we create child controls, what is the style for accept text formats? (i mean: '\t', '\n' and others)

Member Avatar for cambalinho
0
136
Member Avatar for nickliutw

I'm currently writing a program that can track each word appear in a paragraph. For example, if a paragraph is "I have two dogs and two cats......" my program output should be: 'I'appeared 1 time, 'have' appeared 1 time, 'two' appear 2 times ....so on So far, I have two …

Member Avatar for iamthwee
0
158
Member Avatar for mizShaid

how to program that allow user to search, delete existing data, insert new data, sort the data and display the data

Member Avatar for Moschops
0
62
Member Avatar for Fatma_2
Member Avatar for ram619

What is the maximum buffer size allowed in memecpy() function in c, I am using GCC compiler,32-bit system, What is the affecting factor for memcpy failure? ->Alignment issue? ->Size? however the buffer size 256bytes not working, tried 160 bytes copy which fits our requirement

Member Avatar for ram619
0
3K
Member Avatar for Stefan_2

I get this error poping up here and there but I still don't know what it means and how to fix it. "Windows has triggered a breakpoint in program_name.exe. This may be due to a corruption of the heap, which indicates a bug in program_name.exe or any of the DLLs …

Member Avatar for Ancient Dragon
0
224
Member Avatar for cambalinho

when i use the ownerdraw message, with button(for exemple), do i lose the button face or only the text? (i need show a text and image, without lose the button face)

0
70
Member Avatar for gwmang0k

hello, i am really new in C programming. This is regarding switch case. How do i limit user input in switch cases? In this case, after they input 1 or 2, i dont want them to input any other number other than 0. Im still new in loop so any …

Member Avatar for Angus_1
0
542
Member Avatar for XodoX

If I want to have a datagram socket, what do I have to change here ? It's a stream socket right now. Just change it where it creates the socket ? `sockfd = socket(PF_INET,SOCK_STREAM,0);`

Member Avatar for Hiroshe
0
197
Member Avatar for DkgMarine

So i just finished my first c course, so what comes after? like i learnt how to sort arrays, import from files and change them, linked list and stacks and queues, so thats it? can't wait for the new semster to learn more, i just wanted a heads up to …

Member Avatar for Hiroshe
0
163
Member Avatar for almando

i want a program code that convert the decimal to binary numbers and vise versa, and a GUI that contain my name which is: "Hafenaaje" and my student number="120012189. the gui may contain clear, decimal, binary and exit button... please help!!!!

Member Avatar for rubberman
-1
133
Member Avatar for sankubha

Am developing a c programming which contains windows.h header file and GetWindowText api functions.Now i want to run it in linux.Is there is any api in linux or is there is any possiblity to run the c programming on linux.

Member Avatar for Ancient Dragon
0
462
Member Avatar for Felix Arba

Hi guys , I'm giving you the full C# project I have uploaded , since I'm working with windows form , so you can see the source code and run it . http://www.sendspace.com/file/u7z6h0 And now , to explain my problem . The program I wanted to make is sudoku solver …

Member Avatar for Felix Arba
0
562
Member Avatar for senait.kifle.127

Hello everyone, I was given this assignment, but I am stuck. Your help is appreciated :) 1.Ask for a desired accuracy epsilon for the to approximate value of \pi. 2. Use the Leibniz series to approximate pi. 3.Check after each iteration step wether the value of the last summand | …

Member Avatar for cgeier
0
4K
Member Avatar for pspwxp fan

Hi, My task is to create a library/precompiled header for use with MASM. I am using Code:Blocks. I have googled quite a bit and haven't come up with an appropriate solution. I was hoping someone could point me in the right direction. This is what i have done so far: …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for XodoX

I have some experience with client-server codes. TCP and udp client. I want to know how a stream socket works with HTTP. This client is for a server-client code where the greatest common divisor is calculated and displayed. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> …

Member Avatar for Banfa
0
260
Member Avatar for Himanshu Chawla

I am preparing for my exams and i just found this question from previous question papers: Give the C Expression for the following algebric expression : 1. ab^4c^2-d/m-n 2. ab-[{(e+f)^9}/c}] Please help me as i am preparing for my exams and haven't read this topic yet. help plz

Member Avatar for iamthwee
0
241
Member Avatar for Stefan_2

I need a way to print(and later on compare - but for now just print) characters 2 by 2 as in: I have a string of 1F190307091810 and I have to print out: 1F 19 03 04 09 18 10. I need this for Baudot code(I have segments of code …

Member Avatar for Stefan_2
0
357
Member Avatar for chozotheqhai

Currently doing C programming homework, I want to update the value in the file. But now I'm having a problem updating it. The problem I faced now was the codes below update the values but in the form of new lines. Instead of replace the original lines. What's wrong with …

Member Avatar for rubberman
0
328
Member Avatar for dawibob

Hello I'am looking for an alternative of system("CLS") , i don't need my whole screen cleared , i just want a specific text cleared for example : i want the word "loading" to remain on the screen while ". . ." these three dots appear and disappear for period of …

Member Avatar for dawibob
0
139
Member Avatar for costigan555

I am having a little bit of trouble finishing a project I have made for myself. Also, before we begin, it is important to note I don't have much experience with C++ programming and programming in general. I realize my code is probably not the most efficient or even elegant. …

Member Avatar for iamthwee
0
373
Member Avatar for Alxprog

Wikipedia page on DVDVideoSoft says it's written in C++ Qt and C#. So my question is this : in particular regarding the above mentioned product and in general what's written (or should be written) in C++Qt and what in C#?

Member Avatar for Alxprog
0
644
Member Avatar for candyandy212
Member Avatar for Bertram

Hi I wonder if any kind soul could help me with a timer problem in c. I am not at all experienced in writing c code. In a c dll (called from a vb user control) I need to avoid blocking the parent application, and also be able to abort …

Member Avatar for vijitris
0
2K
Member Avatar for nagarjuna

Hi, I m Nagarjuna.I m doin my Masters in Computer Science at Indian Institute of Technology, Kharagpur. My thesis is on VANET security. I m doin a simulation using GloMoSim software. I want to broadcast messages/packets to all nodes(within the transmission range). As far as I ve understood the GloMoSim …

Member Avatar for NASEEMSHAKEEL
0
247
Member Avatar for Jsplinter

I have an mxn matrix, that is stored in memory in an array: matA = new float[m * n]; // ... Assign values matA[0] = 1; matB[1] = 2; // ... After I finish with this array, I then need to create very similar array to store a new mxn …

Member Avatar for Jsplinter
0
282
Member Avatar for XodoX

I want to create a simple stream socket server. I haven't found a website that explains it well. So how do I create a simple stream server ? One connection is fine.

0
106
Member Avatar for uday.raj.73345
Member Avatar for Rahul47

Well, this morning I tried to write a program to update environment variable's list. And I got stuck at a very crucial point. I think am making some silly mistake. A second opinion will be helpful. Algorithm: 1) Take complete path of environment variable into a string variable 'env'. 2) …

Member Avatar for N1GHTS
0
223
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

Hi, I am just playing with C code in the console under Linux. In the old times a fair bit of code was written for a console; programs were operating in text mode, creating menues was quite a fun. I coded very simple c routine to print a strings of …

Member Avatar for N1GHTS
1
3K
Member Avatar for Youssef_1

i am supposed to write a code for searching for a memory offset of a hexadecimal value in a binary file , i successfully wrote the code for normal search but i was asked to do it using binary search any ideas on how can that be done ?

Member Avatar for rubberman
0
63
Member Avatar for lazylibran82
Member Avatar for TaylorS

Create a class named Book that includes auto-implemented properties for the International Standard Book Number (ISBN), title, author, and price. (An ISBN is a unique number assigned to each published book.) Create a child class named TextBook that includes a grade level and a CoffeeTableBook child class that contains no …

Member Avatar for Ancient Dragon
-1
233
Member Avatar for dancks

I wrote this test program to test the binary tree for a particular purpose. The intent is to make 2 new tree nodes with new data and destroy the data of the parent data, as its no longer needed (essentially its supposed to imitate "splitting" but my design calls for …

0
151
Member Avatar for bmcn

I am working from the sample project here: http://www.codeproject.com/Articles/8086/Extending-the-save-file-dialog-class-in-NET I have hidden the address/location bar at the top and made other modifications but I can't for the life of me manage to disable the button that lets you go up to the parent folder. Ist is in the ToolbarWindow32 class …

Member Avatar for bmcn
0
192
Member Avatar for Rushin1992

Hello, My problem is like that when I scan the data using fgets function and after I put fflush function but compiler not wait for taking a data and it is directly go in next value scan.How to solve my program?

Member Avatar for Assembly Guy
0
106
Member Avatar for nitish.mohiputlall

Question : In Bouboun University's Information Systems 3 arrays are used to store student details, 1. Stud_Names (array of strings) holds the name of 100 Students 2. Stud_Map (array of strings) hold the ids of the 100 students (whose details are stored in Stud_Name) 3. Stud_Marks_Mod1 (array of floats) holds …

Member Avatar for Ancient Dragon
0
293
Member Avatar for Vikram Sehgal

So i have a code for a menu and i am facing some problem.. code:- do { ch = getch(); switch(ch) { case 'W': case 'w': system("CLS"); cout<<" MOD v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout << " --> PLAY\n\n"; cout<<" HELP\n\n"; cout<<" EXIT\n\n"; break; case 'E': case 'e': system("CLS"); cout<<" MOD v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout << …

Member Avatar for jkhippie
0
261

The End.