19,876 Topics

Member Avatar for
Member Avatar for joy55

How can I create a code for this task? *You are given a natural number m and natural number n =2, .,.,.. 16. Print the number m in counting system with base n.

Member Avatar for maria198
0
170
Member Avatar for gahhon

there have problems with the output and the calculation... [CODE]void Mark_Attendance() { int answer, temp_Att; FILE *ExistingFile, *AppendingFile, *ReadFile; ExistingFile = fopen("Attendance.txt", "w+"); AppendingFile = fopen("Attendance.txt", "a"); ReadFile = fopen("StudentDetails.txt", "r"); if(!ExistingFile || !AppendingFile || !ReadFile) { system("cls"); printf("This File Cannot Be Open Successfully!!\n"); printf("Please Check It!!\n"); exit(-1); } else …

0
57
Member Avatar for Abhishek_jn

Hi All, i want to know what is the use of const volatile variable, where exactly it is required to use.

Member Avatar for nbaztec
0
429
Member Avatar for florisvd

Hello, We are trying to control 8 7-segment displays by using multiplexing. The problem we have is that we have to program buttons, how can we make it? Best regards, Floris /* Ansteuerung von drei 7-Segmentanzeige im Multiplexbetrieb * Gemeinsame Anode, PB0..PB6 * Spalten: PC0..PC2 * * a * f …

Member Avatar for florisvd
0
146
Member Avatar for cortez716

Okay heres the background on the code. I've written a code that prints a 10x10 array or random numbers. Then prompts the user to pick a number. After user picks a number, the program then tells user the number of times number was found in the array and supossed to …

Member Avatar for vanalex
0
209
Member Avatar for Jean Chew

Hi, can some kind soul advise me on my coding cos it does not seem to work. [CODE] private void DisplayText(object sender, EventArgs e) { textBox1[COLOR="red"].Display[/COLOR](); if ([COLOR="red"]10<x && x<294[/COLOR]) [COLOR="red"]&&[/COLOR] [COLOR="red"](-5<y && y<13[/COLOR]) && (-12<z && z< 228)) textBox1.display("It has moved inwards"); else if (-53<x<-265 && -11<y<37 && -57<z<218) …

Member Avatar for apines
0
193
Member Avatar for jane bella

i need a help in airline reservation system project in c n i dont no how to do that so plz tell me the codes for these we should allow the user to chose 1)to book 2)to cancel 3)view data 4)quit as well as they have to enter them name …

Member Avatar for jane bella
0
183
Member Avatar for MarounMaroun

Hey all, I'm trying to implement a function InitMatrix which suppose to return a pointer to a new created 3d array of the size determined by x,y and z. I have a struct which represents a matrix and should be able to deal with some functions required, like setting the …

Member Avatar for Ancient Dragon
0
299
Member Avatar for volkang

Hi i ve been dealing with a program and encountred a weird problem. the problem is that my array variable por[27][1]'s value changes for no reason. please take a look at the pictures in the attachment. the pictures belong to debugging.

Member Avatar for volkang
0
163
Member Avatar for TGeorge824

Hello, I have an assignment where we are supposed to populate an operating system's ready queue with processes and try various process scheduling scheme and record their wait times. To do this i made a rudimentary structure for a process: [CODE]typedef struct{ int ID; int wait_time; int exec_time; }process; [/CODE] …

Member Avatar for TGeorge824
0
155
Member Avatar for Purrenhage

I am learning C++. This class project was to write a program that will let you enter a diver's first and last name and city. Also 5 judges results along with the difficulty for the course. Then display the results. It is suppose to ask if you want to enter …

0
78
Member Avatar for MarounMaroun

Salam, My mission is to program a cube[I](given its dimensions (x,y,z))[/I]. The cube will be represented in a struct, which I'll choose what data members it should contain. I need to implement the allocation function(which actually creates the matrix) and some other functions. The most important function is the setter …

Member Avatar for myk45
0
109
Member Avatar for yigster

[CODE]namespace week4Matrix { class Program { int[,] a; int[,] b; int[,] c; static void Main(string[] args) { } public void TransposeMatrix() { for (int i = 0; i < a.GetLength(0); i++) { for (int j = 0; j < a.GetLength(1); j++) { c[j, i] = a[i, j]; } } } …

0
61
Member Avatar for RobBobSmith

Hello all: I am working on a class for creating 2-D arrays. A couple of days ago, someone kindly helped me identify a problem with my operator() expression, but now I'm getting a segmentation fault. I just can't figure out where the problem is! If anyone could take a look …

Member Avatar for RobBobSmith
0
410
Member Avatar for indrajeet6

[COLOR="Green"]Hi, I'm trying to write a linked list Program to accept a no. and print all the prime numbers less than it, using the sieve method, Explained below: Suppose that n=30.Then we list all the numbers till 30, and cross out 1 and all the multiples of 2, then 3,then …

0
259
Member Avatar for MichaelSammels

Hi DaniWeb, [INDENT]So when you right click an .exe file (one you compile with C) you get the option to view the details such as File Description, File Version, Product Name, etc. I was wondering how to change these? I assume it'll be a C command, but I'm not entirely …

Member Avatar for mohanty_555
0
79
Member Avatar for o0OPatriciaO0o
Member Avatar for MarounMaroun

Hello guys, Can someone explain what is going on on this code? 1. why we needed **p in the function [B]AllocString[/B]? 2. why if I change [B]AllocString(strlen(s), &copy);[/B] to [B]AllocString(strlen(s)-7, &copy);[/B] I can still get a good result? Thanks! [code=c] #include <stdlib.h> int main() { char *s="example"; char *copy=NULL; AllocString(strlen(s), …

Member Avatar for MarounMaroun
0
106
Member Avatar for z_a

While reading Stroustrup's "The C++ programming language", I was puzzled at 'declaring a pointer to an array of character strings and declaring a reference to an array of 10 integers', and I had to clear my mind on pointers to arrays. I am posting here the notes I made to …

Member Avatar for z_a
0
457
Member Avatar for mashhype

Hi, I am trying to figure out how to get my program to do one of two things: Either... 1. Create and remove a semaphore based on me entering a 'r' in the command line at argv[1] or 2. If argv[1] is a 'n', then I want check to see …

Member Avatar for mashhype
0
259
Member Avatar for onus

[[url]http://lxr.free-electrons.com/source/drivers/net/8139too.c#L498][/url][1] On above link What I am not getting is the structure [CODE] static const struct { const char *name; u32 version; /* from RTL8139C/RTL8139D docs */ u32 flags; } rtl_chip_info[] = { { "RTL-8139", HW_REVID(1, 0, 0, 0, 0, 0, 0), HasHltClk, },[/CODE] gets expanded to [CODE] static const …

0
54
Member Avatar for gbsn3219

Hello. I am relatively new to C++ programming, and I have a question about a program that I am supposed to write. The assignment reads... Prompt the user for a word; call it SEARCH. Then begin reading words from the user, counting them until SEARCH is entered. Display how many …

Member Avatar for gbsn3219
0
161
Member Avatar for Joey_Brown

Hello; I would like to compress an 1D array of arbitrary number of elements. For instance if a user inputs IN : 111122233331 OUT: 14233411 [it shrinks/increases the array and replaces all the identical consecutive elements with a number of how many times theyve appeared.] This task must be accomplished …

Member Avatar for Joey_Brown
0
111
Member Avatar for rodkay

Hi all, Quite a basic question for most of you; I am trying to obtain length of a string < char [b]name[MAX_ENTRIES][MAX_NAME_SIZE][/b] > for use in a for loop that will perform isalpha. [size=3][color=blue]for (int j=0; j < &name[i].length(); j++)[/color][/size] [color=black]I am getting [/color][color=red]error 2228: left of '.length' must have …

Member Avatar for ashishkumar008
1
176
Member Avatar for mashhype

Hi I am new to C. I'm taking an operating systems class right now and I have a project that requires me to create a set of semaphores. The command line takes in: filename ropt NS value1 value2 value3...valueNS Where argv0 is the filename Argv1 is the option to remove …

Member Avatar for apines
0
79
Member Avatar for cwarn23

Hi, I'm writing a large program but require Multithreading for this software. I've searched the web for just over an hour and now is just after midnight but still can't find anything simple. The only thing I saw that came close to what I need was at [URL="http://www.computersciencelab.com/MultithreadingTut1.htm"]http://www.computersciencelab.com/MultithreadingTut1.htm[/URL] but I …

Member Avatar for Ancient Dragon
0
728
Member Avatar for tastyTreeHUGGER

I am writing a calendar in C. I'm still very new to the language. I think i wrote most of the functions/algorithms correctly (it would be nice if you guys could check for any errors too). Now I'm having a tough time printing the calendar out In a correct format. …

Member Avatar for tastyTreeHUGGER
0
304
Member Avatar for Tyster

Hi folks, I'm quite new to C++ and I'm getting an exception I don't understand. I have a class named 'Rational' that performs calculations on fractions. It has a default constructor as follows... [CODE] //In Rational.h public: Rational(int num = 1, int denom = 2); //Default constructor void addition(Rational); void …

Member Avatar for mike_2000_17
0
161
Member Avatar for geryin

Write a function that accepts an array of integers and determines the product of each two integers. Although you can create a fixed size array in main, your function should work no matter what size of array is passed to the function. MY code: [CODE]#include <iostream> using namespace std; void …

Member Avatar for Lerner
0
102
Member Avatar for petrkotas

I am not sure if this is more software problem or C problem. Nevertheless, I am trying to run simple test code to check if my lapack installation is OK. [CODE]#include <stdio.h> #include <atlas_enum.h> #include "clapack.h" double m[] = { 3, 1, 3, 1, 5, 9, 2, 6, 5 }; …

0
90
Member Avatar for myk45

Hello, i needed suggestions regarding the book "Art of Computer Programming" by Donald E Knuth. im an undergraduate Computer Science student. i would like to know more about the book before i buy it. So, any reviews? Reviews as to how the Math in it is(i heard there are a …

Member Avatar for myk45
0
109
Member Avatar for robsbots

Hi all. I would like to write a network server in C to run on debian linux. I have some network code thats working, BUT at the same time I want to read data from a serial port, and process it. I want to build a linux based server to …

0
41
Member Avatar for berwick53

I've got to write a program where it replaces a letter with a dash and then asks the user to enter the letter that should be their. I've written a program and It works the first time around and then prints out two lines. Where have I gone wrong ?? …

Member Avatar for myk45
0
144
Member Avatar for vinitmittal2008

Hello Friends I want to pass a Double Dimension Array to a Function using Pointers... Right Now i am doing this.. [CODE] # include <stdio.h> void show(int *,int,int); int main() { int a[3][3]={1,2,3, 4,5,6, 7,8,9}; show(a[0],3,3); return(0); } void show(int *p,int row,int col) { int i,j; printf("\n\n\n"); for(i=0;i<row;i++) { for(j=0;j<col;j++) …

Member Avatar for vinitmittal2008
0
10K
Member Avatar for pikpik

Hi, As part of porting a (mostly C++) library[1] to a "new" operating system[2], I'm trying to link the library's semaphore class to the platform's semaphore implementation. The problem is that the library assumes that the semaphore implementation will be a modern POSIX one[3] but the operating system's semaphores are …

0
170
Member Avatar for vinitmittal2008

Please give Free download links of Latest and Best C/C++ Compilers for Windows...

Member Avatar for Ancient Dragon
0
162
Member Avatar for myrk

Hello, Can anyone suggest a GUI library that meets the following criteria? * Cross-Platform * Doesn't control the main loop * Not 100% object-oriented; similar to Xlib :) * Not many pointers please (like FLTK that every object is a pointer) * Free to use for closed source and open …

Member Avatar for Stefano Mtangoo
0
709
Member Avatar for yaya

question about pointer and array. can we add a 2-D array (**A) with a 1-D array (*B)? both of the array is define as a pointer in the program. where array A is A[i][j] and B is B[i] new in C programming and pointer is difficult.... :-|

Member Avatar for somnath Basak
0
161
Member Avatar for berwick53

Please can you tell me where I've gone wrong !!! thanks Sam [CODE]#include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> int main() { char array[80]; // input array int i=0; // loop counter 1 int vo=0; // vowels int co=0; // consonents int ot=0; // other characters printf("please enter string\n"); fflush(stdin); gets(array); while(i!=80) { …

Member Avatar for vinitmittal2008
0
158
Member Avatar for stpmani

Hi advance thanks... kindly let me know the detail command and communication with smart card... tell me the reference and suggestion....i have 94POS Machine.. i need to write and read the data from 94POS Machine with smart card...

Member Avatar for nitin khare
0
86
Member Avatar for Ahmed Sarwat

Hello, I am trying to read two floats from a file written in its first line using the below code but after compiling I always get "wrong dimnesions" coulp please help me in that problem. Thanks in advance. [CODE]#include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctype.h> int main() { float …

Member Avatar for Ahmed Sarwat
0
3K
Member Avatar for kimlong008

Please give me code demo by C or C++ : Speak file text ! HRESULT hr = S_OK; CComPtr <ISpVoice> cpVoice; CComPtr <ISpObjectToken> cpToken; CComPtr <IEnumSpObjectTokens> cpEnum; //Create a SAPI voice hr = cpVoice.CoCreateInstance( CLSID_SpVoice ); //Enumerate voice tokens with attribute "Name=Microsoft Sam” if(SUCCEEDED(hr)) { hr = SpEnumTokens(SPCAT_VOICES, L"Name=Microsoft Sam", …

Member Avatar for kimlong008
0
164
Member Avatar for cmb2thim

could you please help me? i need to write a program, no dynamic allocation, using classes and arrays to multiply only 3x3 matrices only

Member Avatar for daviddoria
0
61
Member Avatar for Joey_Brown

Hello, Im looking at this weird little code fragment I stumbled upon the other day and I cant figure out how it works. OK, I get the picture how the array is filled up to the fourth index, but that descending part is evil. And weird. :) [CODE] #include<stdio.h> int …

Member Avatar for smellissa
0
98
Member Avatar for Alerwiali

Hi Every one in this great community ...i need help with Nokia BlockD game algorithm i really do not know how to start ,,,please could anyone here can get my feet on the stage ,just help me with some ideas to be able to get started: The rules of the …

Member Avatar for Alerwiali
0
70
Member Avatar for xcr

Hello all, I turn once again to the wisdom of the internet: I have attached my two files to this post as to not use up a whole lot of space. The program is a mock "assembler" it takes mock assembly code and turns it into a file with hex …

Member Avatar for Ancient Dragon
0
175
Member Avatar for araisbec

Alright, so I've spent countless hours on this code and I need a fresh pair of eyes to give it a glance... This is my third assignment for my datastructures class, where I am to write code that turns a fully parenthesized expression (such as "((3+2)/(3-8))") into aan "arithemtic expression …

Member Avatar for araisbec
0
679
Member Avatar for gahhon

[CODE]#include <stdio.h> #include <windows.h> void main() { int i; for(i=0; i<21; i++) { if(i == 5) { system("cls"); printf("\n\n\n\n"); printf("\t\t ***************************************\n"); printf("\t\t ***************************************\n"); printf("\t\t *** ***\n"); printf("\t\t *** WELCOME TO ***\n"); printf("\t\t *** CLASS ATTENDANCE SYSTEM ***\n"); printf("\t\t *** ***\n"); printf("\t\t ***************************************\n"); printf("\t\t ***************************************\n"); printf("\n\n"); } if(i == 10) { …

Member Avatar for gahhon
0
150
Member Avatar for superjj

I want to read a bmp file in c. i can read the header but now i need to see het photo. the attachments is am exemple. [CODE]#include <stdio.h> /* We moeten een apparte struct aanmaken voor de Magic Number, anders krijgen we een foutieve waarde hiervoor.*/ struct MagicNumber{ unsigned …

Member Avatar for myk45
0
241
Member Avatar for centerline00

O.K., I have a project I'm working on. It uses 8 classes (I'm only showing 2 and main). It gives me a "bad_alloc" error when the obj is instantiated. When obj is removed it works fine (or call the personType class that "should" be inherited from extPersonType.) Any thoughts of …

Member Avatar for Fbody
0
237

The End.