19,876 Topics

Member Avatar for
Member Avatar for patrickw99

I have some programs that use the D-Flat Library. This is a DOS based library. I am looking for help with porting this library to Linux command line environment. I need pointers to documentation on how to replace the low level keyboard, mouse, video functions to the Linux command line …

Member Avatar for Salem
0
101
Member Avatar for angelfriend89

hi, I want to run lkdemo.c which comes as a sample of open cv. Actually i am interested in using algorthim of optical flow in order to track movement of an object for my project but it gives error which says segmentation fault.my operating system is linux .it is showing …

Member Avatar for Salem
0
362
Member Avatar for mithunp

The conditions for the question 1. you dont have any head ptr 2. you cant traverse as you dont have head ptr 3. its a singly link list 4. each node is dynamically allocated You only have a pointer to the node which you have to delete, and that is …

Member Avatar for WaltP
0
310
Member Avatar for mhirschb

Hi all, I am currently extending a large C project with an own extension and I am stuck in a pointer/array/struct problem: The project offers a struct of this structure [CODE]struct ip_addr{ unsigned int af; /* address family: AF_INET6 or AF_INET */ unsigned int len; /* address len, 16 or …

Member Avatar for nezachem
0
183
Member Avatar for danieldane

//include files #include<stdio.h> #include<conio.h> #include<stdlib.h> #include"c:/includes.h" //stores the structures of master and index file #include"c:/function.cpp" //stores all the functions for the file primitive /* The main function input: none output:none calleed by: OS. calls: ADD_RECORD,DELETE_RECORD,MODIFY_RECORD,SEARCH_RECORD,DISPLAY_RECORD */ void main(void) { int choice; int status; int roll_no; char ch; clrscr(); printf("Enter the …

Member Avatar for danieldane
0
181
Member Avatar for jodzjcm

{ char user[]={'\0'}; char* animal_holder[12]={"Ant","Bear","Cat","D… printf("You have to guess what %c%c%c%c stands for.\n",animal_holder[a][0],animal_holde… printf("Enter your guess:"); scanf("%s",user); if(user==*animal_holder) printf("Your choice is %s",user); } What are the errors?

Member Avatar for Narue
0
141
Member Avatar for priily
Member Avatar for Narue
-1
61
Member Avatar for vincenzorm117

In the code below I am attempting to establish a method of inputing a year with digits (only digits) into the character array of year. It works, but now if the inputed non-digits are 4 or more (i.e. "abcd") the program runs the printf command more than once. I recommend …

Member Avatar for Narue
0
204
Member Avatar for Scrubber1

Hi my PC has no sound and the 'C-Media AC97 Audio Device' in the device manager has a yellow exclamation mark next to it. I have tried un-installing and re-installing it but this does nothing. Can anybody tell me how to fix this or how to aquire a working device …

Member Avatar for caperjack
0
647
Member Avatar for ineedsomehelp:3

Ok, this is my 3rd time asking a question so far I can see that people here are very helpful and I appreciate it :) today I have a question if something like this is possible [CODE]#include<stdio.h> #include<stdlib.h> int difficulty() { char difficulty; printf("Level of difficulty? (l-Low,h-High) - "); scanf("%c",&difficulty); …

Member Avatar for ineedsomehelp:3
0
130
Member Avatar for arindam31

[CODE]struct marks{ int p:3; int c:3; int m:2; }; void main() { struct marks s={2,-6,5}; printf("%d %d %d",s.p,s.c,s.m); }[/CODE] Output 2 2 1

Member Avatar for arindam31
0
4K
Member Avatar for annitaz

My code for the calculator is: calculator.h [CODE]#ifndef CALCULATOR_H #define CALCULATOR_H #include <QWidget> #include <QGridLayout> #include <QLineEdit> #include <QLabel> #include <QPushButton> #include <QLCDNumber> #include <QString> #include <QMessageBox> #include <QErrorMessage> class Calculator : public QWidget { Q_OBJECT public: //constructor Calculator(); public slots: //function to add the two numbers that the user …

Member Avatar for imolorhe
-1
363
Member Avatar for jodzjcm

char animal_holder[12]={'A','B','C','D','E','… char* animal_master[12]= {"Ant","Bear","Cat","Dog","Eagle","Gan… I've used the srand and rand function to get randomly a letter from the animal_holder array. Now if the program inputs ABCD....ABCD should be equivalent to ant bear cat dog from the string animal master....HOW TO DO THAT????

Member Avatar for imolorhe
0
124
Member Avatar for itgrowsind

I have to write a code that accepts 5 grades and sorts them from smallest to greatest using linked list.This is what I have so far using examples from the book. #include <iostream> using namespace std; struct List { int value; List *next; }; int main() { int num, num1,num2,num3,num4; …

Member Avatar for Saith
0
140
Member Avatar for dotancohen

I am looking to learn best practices for working with strings. Two issues that I have with strncat are that it is difficult to calculate how much space to allow, and that there may not be a null character in the string after the procedure. So if I have two …

Member Avatar for WaltP
0
428
Member Avatar for dotancohen

When dealing with pointers, the "&" sign is called the address-of urinary operator. Knowing it's name sure helps to understand when to use it. Is "*" a urinary operator as well, and if so, what is its name? If it is not an operator, then what is it? Thanks.

Member Avatar for dotancohen
0
106
Member Avatar for AKISS

using c++ program perform a cash egister process having an inputted money and the total amount purchase in a store ex. item1:___ item2:___ item3:___ ... up to item n:___ money =___ total purchases:__ change:___ anyone can help me with this program?? thanks BIG HELP ..

Member Avatar for WaltP
0
88
Member Avatar for turista

Hi i saw a post about this program already. im new to c++ and im lost... completely lost... im not even sure im posting this in the right place. anyways. the program i got is working correctly until i make it an OOP which is what my teacher wants us …

Member Avatar for Chilton
0
259
Member Avatar for pradeepmallick8

Dear Sir, I am student I want to research in image processing . So please give me some information about this and how to write program. Also plesae send the code for image segmentation and how tojoin the image. with regards Pradeep Kumar Mallick IIMT, Bhubaneswar

Member Avatar for maxzoel
-3
348
Member Avatar for NewbieinC

[CODE]************** TURN 1 **************** | | | | | | a | b | c j | k | l r | s | t __ |___| __ __ |___| __ __ |___| __ | | | | | | d | e | f m | W | n …

Member Avatar for sfuo
0
99
Member Avatar for ineedsomehelp:3

Ok, I need to make a program that randomly generates 4 random letters from 12 random letter and it cannot reapeat the same letter. for example you can only pick from a,b,c,d,e,f,g,h,i,j,k,l and the program can randomly generate a,b,c,d or b,c,d,e but should not generate a,a,b,b or something that repeats.Another …

Member Avatar for ineedsomehelp:3
0
382
Member Avatar for seo2005

Hi, I would like to print star pattern in the following way - **** *** ** * main() int i; clrscr(); for(i=4;i<=4;i++) { printf("*"); getch(); } It prints starts like **** I don't know how to complete the program. Can anyone please do the complete program for this so that …

Member Avatar for archi vachhani
0
206
Member Avatar for NewbieinC

[CODE]main(){ char cChoice, cMarker1; printf("****************************************\n\n"); printf(" FLIP!-TAC-TOE 3D \n\n"); printf(" Enter S to start the game or \n\n"); printf(" E to exit! \n\n"); printf(" Choice: \n\n ", cChoice); printf("****************************************\n\n"); scanf("%c", &cChoice); system("CLS");[/CODE] this is the task:Display a simple introduction screen at the beginning of the game. After making a choice …

Member Avatar for Adak
0
132
Member Avatar for Weliaz

Hi there! I am creating a game! [code] #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #include <SDL.h> #include <string> #include "font.h" #include "SDL_rotozoom.h" SDL_Surface *back; SDL_Surface *image; SDL_Surface *screen; SDLFont * font1; int y = 750; char * string = "Made by Weliaz @ http://weliaz.me"; int xpos=512,ypos=384; double opos = 180; …

0
100
Member Avatar for vincenzorm117

Hey very simple problem. I've been searching the site to see if I did anything wrong and I had to fail because I still get the wrong results (semantic error). Problem #1: Every time I use fopen with the "w" (or write) mode the file with whatever name given is …

Member Avatar for vincenzorm117
0
1K
Member Avatar for Sonia11

Hi folks, I want to count the number of times elements in the array 'store' occurs. I have gone this far. What I want is to count the number of times the elements occurs like if 2 is occurring then it will begin with one, if again 2 is occurring, …

Member Avatar for gusano79
0
117
Member Avatar for dotancohen

When printing an int to stdout, the %d type is used. Why "d"? The other types (s for string, c for char, f for float) all make mnemonic sense, but I cannot figure out why "d" for int. It's not short for "double" or "decimal" I think.

Member Avatar for Ancient Dragon
0
132
Member Avatar for pretu

HI All How can we generate a sine wave without using the sin() function. Thanks pretu

Member Avatar for jayeshkamble143
0
600
Member Avatar for itgrowsind

Im trying to write a program that will get 10 different houses information about those houses will be price square feet and rooms. I have to use an infile about the information and then have it sort by selection or bubble sort also use a header file, can anyone help …

Member Avatar for itgrowsind
0
120
Member Avatar for alwaysLearning0

Mike_2000_17 and Narue Just a thought: You should write a beginner's tutorial on C++0x for Daniweb. That will be a great way to promote this site. I can also contribute on some easier topics!!.

Member Avatar for mike_2000_17
1
162
Member Avatar for debasishgang7

hi all, I am trying to pass an array to a function. an array is like char game[4] = {'S', 'R', 'D'}; i wanna pass the entire array to a function which accept. like this void name(char *game) How to do this..?

Member Avatar for abhimanipal
0
183
Member Avatar for logicmonster

I have two different ways to traverse a tree adt that essentially do the same thing except one is a recursive function and the other is iterative. How could I compare the efficiency between them? RECURSIVE [CODE]inorder(node) if node.left ≠ null then inorder(node.left) print node.value if node.right ≠ null then …

Member Avatar for abhimanipal
0
135
Member Avatar for logicmonster

Aside from using switch statements, do-while loops, and if-else trees, is there a good way to complete error checking after a user input from the keyboard?

Member Avatar for abhimanipal
0
187
Member Avatar for debasishgang7

hi all, i am trying to make a prog. which will read the first line of a text file and put the first line into an array and pass the entire array to a function. Here is my code: [CODE]#include <stdio.h> #include <conio.h> #include <string.h> #include <string.h> void exe(char cmd) …

Member Avatar for abhimanipal
0
191
Member Avatar for pseudorandom21

I need to know a bit about this "default int" thing in C. What I mean is, is this actually ok and with what version of C is it ok? [code] main() { return 0; } [/code] As far as I knew this was standard modern C (i.e., no retarded …

Member Avatar for Narue
0
148
Member Avatar for debasishgang7

[CODE]#include <stdio.h> #include <conio.h> main() { int i; char full; char array[10]="ABCD"; for (i=0;i<=6;i++) full = array[i]; printf("%c",full); } [/CODE] I wanna convert an array to a full character .So that i can print the character like this line printf("%c",full); This program unable to print the character?? Whats wrong in …

Member Avatar for abhimanipal
0
165
Member Avatar for Chona Ramos

using c++ program,enter students record and perform the following activity: save search delete view edit print

Member Avatar for WaltP
0
166
Member Avatar for arlir

Hi there Everbody, I am using Borland c++ 5.02 for my C projects but a funny thing happens at run time.Though the source code compiles minus errors, I can't get to see my output because the command prompt just appears and disappears straight away.What could be causing this?

Member Avatar for arlir
0
115
Member Avatar for thecoolman5

hi, i am just wondering how to open a picture of a normal format. I know that you cant do it in the console. And i am using the compiler DEV-C++. Thanks

Member Avatar for mike_2000_17
0
332
Member Avatar for debasishgang7

Hi guys here is my problem.I am trying to send ICMP packets to a HOST using WINSOK.So here is my code: [CODE]#define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <ws2tcpip.h> #include <stdio.h> #include <stdlib.h> #define IP_RECORD_ROUTE 0x7 // // IP header structure // typedef struct _iphdr { unsigned int h_len:4; // Length of …

0
163
Member Avatar for babis87

Hello! I am making a program which does many computations for a Photovoltaic system. The problem is that i get a strange segmentation fault error when I run the program. Here is where it crushes (at for-loop of calculation S5) : [CODE] commands..... ... ... /******************** WIRING *******************************/ Ni = …

Member Avatar for Salem
0
2K
Member Avatar for ahmed30

hello i just have started learning c++ but i have a big problem at sources .. i want to make something is unsigned then i have to change it from int3t_t to unit64_t but when i change it at player.h it says it must be changed at creature.cpp and alot …

Member Avatar for ahmed30
0
120
Member Avatar for ticktoc09

Im still noob on C Programming. And I just want to ask can you help me understand this codes. Like share some link about this topic and is there other way on doing it? The output of this is like: When I type HELLO the output will be URYYB (Rot13 …

Member Avatar for syria718
0
119
Member Avatar for reza.adinata

Hi all, I have a simple code below [CODE]#include <stdio.h> #include <string.h> typedef struct { int apn_in_use; } bts_pdn_con_t; typedef struct _bts_pdn_con_list_t_slot { bts_pdn_con_t conn; struct _bts_pdn_con_list_t_slot *next, *prev; } bts_pdn_con_list_t_slot; typedef struct { bts_pdn_con_list_t_slot *head, *tail; } bts_pdn_con_list_t; typedef struct { int umsi; bts_pdn_con_list_t connections; } bts_ue_t; int funct(bts_ue_t …

Member Avatar for Narue
0
229
Member Avatar for venomxxl

Ok, first of all, I'm not sure if this belongs to C section. Since WinAPI is written in C, I'll post here. I'm using OpenGL with Win32 windows (not sure how to call that). I can't switch to fullscreen mode after creating the window. I'm using Windows 7 (64-bits) and …

Member Avatar for venomxxl
0
540
Member Avatar for mohanraj.m

char=l; string='hello'; This is my input,The particular character present in the string to change lower letter to upper letter. Output: heLLo Please anybody help me;

Member Avatar for WaltP
0
155
Member Avatar for Barnifericus

Whenever I try to compile my code for this function my compiler keeps throwing projectB.c:31:15: error: conflicting types for ‘returnDegree’ projectB.c:19:17: note: previous implicit declaration of ‘returnDegree’ was here [CODE] #include <stdio.h> #include<math.h> int main(){ double sanantonioLat; sanantonioLat = returnDegree(29.0,25.0,51.0); printf("blah %f\n" , sanantonioLat); return 0; } static double returnDegree(double …

Member Avatar for Barnifericus
0
140
Member Avatar for bimoweemo

I keep getting errors and i dont know what im doing wrong.I've included just pieces of these three files. The compiler is giving me errors and i dont know what's wrong. this is my header file List.h not all but some of it. [CODE]#include <iostream> using namespace std; #ifndef INTEGERLIST_H …

Member Avatar for NathanOliver
0
207
Member Avatar for libathos

hi, i want to compile a file through the makefile command.Once i type make example it says that it is up to date but when i try to run it (correct me if I'm wrong ./example) it says that permission was denied..does anybody have any clue about that?

Member Avatar for libathos
0
127
Member Avatar for ari$av3s

If I have the following code [CODE]#include <stdio.h> #include <ctype.h> #include <string.h> int main(void) { char prose[] = "to be or not to be that is the question"; int i, len; len = strlen(prose); puts (prose); return 0; }[/CODE] where would I insert the function Cap to capitalize the first …

Member Avatar for arindam31
0
169

The End.