15,554 Topics

Member Avatar for
Member Avatar for sbenware

I'm having a problem with my search function for my linked list. It has to do with my foodItem object. I'm not sure what to replace it with since it's part of the function protocol. The previous version of this [URL="http://www.daniweb.com/techtalkforums/thread72745.html#"]code[/URL] used an array and part of my problem is …

Member Avatar for nottoshabi
0
175
Member Avatar for Savage221

I'm having some trouble keeping this array in bounds. I have a 10x10 array that I print out on screen. I call a function that changes the center value [5][5] and the values below/to the right/left of this center value. [i][j+1] [i-1][j+1], etc.. So the values constantly change and constantly …

Member Avatar for thekashyap
0
88
Member Avatar for addicted

Hey, There are somethings i dont understand in classes, for example let us examine this : we created a class Employee , with private data members firstName, lastName and monthlySalary; we have some functions that performs operations like a constructor, set and get functions on this data members. Now! we …

Member Avatar for ~s.o.s~
0
114
Member Avatar for MIGSoft

Hey everybody, Could somebody please provide an example for using the STL find_if for the following task. I am trying to search a vector of structs, using the following criteria: compare whether the key of the struct in the vector matches the key of another struct (instace of the same …

Member Avatar for vijayan121
0
179
Member Avatar for gpta_varun

Hi All .. consider the case : [code] class test { public : int a; test(); } class test_derv : public test { public: int a; }; void main() { test * pctest = new test_derv; delete pctest; } [/code] We have implicit destructors defined , when their actual definition …

Member Avatar for John A
0
87
Member Avatar for endsamsara

Hi, well i'm a program that has to show 3 rectangles and a menu (which will add data and then show in the rectangles) to simulate a processor but i´m getting a problem when the program runs, it shows the rectangles and a the menu right, but when i use …

Member Avatar for endsamsara
0
90
Member Avatar for IwalkAlone

Q.Write a function to accept upto 25 numbers and display highest and lowest number along with all the numbers. Solution I tried [code=c] #include<stdio.h> #include<conio.h> void main() { int array[25],low,high; int i; clrscr(); do { printf("Enter a number(0 to terminate)\n"); scanf("%d",&array[i]); }while(array[i]!=0); i=0; low=high=array[0]; while(array[i]!=0) { if (low>array[i]) low=array[i]; else …

Member Avatar for IwalkAlone
0
199
Member Avatar for flageolet

I want to create several files at once containing the same data. Is this possible? I tried using a variable in the file pointer and file name: [CODE] int tel; for (tel = 0; tel < 200; tel++) { FILE *bestand_patienten[tel] = fopen("patienten/patientent[tel].txt", "w"); fprintf (bestand_patienten[tel], "hallo"); } [/CODE] Didn't …

Member Avatar for flageolet
0
66
Member Avatar for n.aggel

hi, i want to develop a console interface for a program that i made{a university project}...... so i was wondering if anyone {with expertise in this matter} can supply me with links or examples..... For example , i am searching for ascii art...and also for ways to create menus with …

Member Avatar for nottoshabi
0
111
Member Avatar for Jishnu

Hello eveyone, I am working on a program that uses the graphics.h library functions and the 0x33 mouse interrupt. When I click at a particular place on the screen, the graphics nearby the mouse are saved and displayed on the new screen (that appears due to the mouse click) when …

Member Avatar for ~s.o.s~
0
152
Member Avatar for RisTar

Hi , im trying to create a program that could delete number from an array and resize the array to the correct size . Array[0] = 32 Array[1] = 30 Array[2] = 40 Array[3] = 31 Array[4] = 61 Deleting the number 40 New array Array[0] = 32 Array[1] = …

Member Avatar for RisTar
0
111
Member Avatar for gamodg

input: source:1.1.2.3:?: destination:1.2.3.4 data:shfg hshsg h am trying to extract `1.1.2.3` from `source:1.1.2.3` please suggest :!: while(!mod.eof()) { mod.getline(buf,100); if(strstr(buf,"Source")) { w=strchr(buf,':'); strcpy(str,*w); } }

Member Avatar for Ancient Dragon
0
103
Member Avatar for Brent.tc

How can i find the curret position of the mouse and then use them in mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0)

Member Avatar for Ancient Dragon
0
58
Member Avatar for vicky_dev

Check this code: [code=c] float velocity, acc, time; . . velocity = velocity - acc * time if( velocity == 0.0 ) { // Do something } else { // Do something else } [/code] This code isn't always workng. When the velocity is supposed to be exact 0, it …

Member Avatar for vicky_dev
0
81
Member Avatar for bobcats

Hi guys I am really having a hard time with C programming. Our lectures are very fast and not beneficial to those with non-C backgrounds. We were required to write a code for counting frequency of words from stdin and then listing them in descending order with those with equal …

Member Avatar for bobcats
0
346
Member Avatar for endsamsara

Hi, I have some rectangles in the result of a program And i want to make a function called menu (called pressing F1) that takes me to another screen and gives me some options, but when i press F1 the screen is all gray!!! and the rectangles are not there …

Member Avatar for WaltP
0
95
Member Avatar for noora000

Hello, Can you please help me I want to know the functions used to save a data in access database, I have the code to save in a file but is it possible to save in a database in C language. Reegards, Noora

Member Avatar for John A
0
109
Member Avatar for mrjoli021

I have to write a program sort of like a hangman game. It will ask the user for a word and them prompts the user for a letter. I will tell the user how many time the letter is in the word and continue to ask for another letter. any …

Member Avatar for mrjoli021
0
75
Member Avatar for jobellelaiza

[COLOR=DarkSlateGray]guys, can you help me..it's an urgent i just have to answer this question for my take home final exam... [/COLOR] [COLOR=DarkSlateGray]our professor just taught a little of it and i've got a hard time studying it but still it's not worth it this is the last chance i have... …

Member Avatar for ~s.o.s~
-1
152
Member Avatar for levk

Hi, I have an abstract class like this: [code]class Descriptor { public: virtual ULONG dispatch(char*, size_t, Stream) = 0; };[/code] and I have a subclass like this: [code]class ConsoleShell : public Descriptor { public: ULONG dispatch(char*, size_t, Stream*); }; #include "services/console/Console.cpp"[/code] and in Console.cpp: [code]ULONG ConsoleShell::dispatch(char *cmd, size_t len, Stream …

Member Avatar for ~s.o.s~
0
228
Member Avatar for Bobbiegirl

I have a project that is due and I have written the code and for a part of the code output to the file I cannot get the right format. I cannot figure out what the formatting should be can someone please help me. [code]#include <stdio.h> #include <stdlib.h> #include <string.h> …

Member Avatar for Aia
0
165
Member Avatar for roby4eldiablo

Hi all, i need help about signal. I want know what signal are generated from system when a mathematical operation give error (overflow, underflow, division for 0) and how catch the signal. Maybe i can use a trap? How can i implement the trap? Maybe i can use matherr function?

Member Avatar for ~s.o.s~
0
54
Member Avatar for disc

Goodmorning, Can anyone tell me how to convert a TCHAR to a std::string ?? Thanks....

Member Avatar for disc
0
191
Member Avatar for Tales
Member Avatar for Ancient Dragon
0
94
Member Avatar for pupsia

Hello!! I realy need some help!! :sad: :cry: With Fibonacci numbers :( I found some programes, and they are a lot of help :cheesy: but... I need some more help :rolleyes: [code] #include <iostream> #include <conio.h> using namespace std; int main () { int a[128]; int fN; int i; a[0]=1; …

Member Avatar for John A
0
380
Member Avatar for flageolet

I would like my program to execute some code using random variables. Whether this happens is dependant of three conditions: 1) a variable (first) should be bigger than an other (second) 2) a variable (third) should be equal to an other (fourth) 3) it should check these thing maximum 5 …

Member Avatar for WaltP
0
117
Member Avatar for hbk619

i'm wrting a basic C program which the user "talks" to the program, you know the sort. well my main menu looks like this: [code] int main() { char name[50]; char mood; printf("hey there, .. whats your name?\n"); gets(name); printf("%s is it? Well how are you today?\n a.Good\n b.Ok\n c.Bad\n", …

Member Avatar for hbk619
0
204
Member Avatar for roby4eldiablo

Hi all, i'm making a client-server concurrent in C. the client send me 2 binary number and an operator. I'll must send him the result and if there's overflow, underflow. i have made all the initial part of setting the server, children pool and so on. i receive 2 binary …

Member Avatar for jwenting
0
97
Member Avatar for ankit_the_hawk

I am having a problem in sorting by name. for eg: if given two names Sameer and Sean, I want to print Sameer and not Sean. It needs to check character by character. I have to extend this to a greater no. of names but I need to get the …

Member Avatar for lakshmi.1987
0
263
Member Avatar for rajeshreddy

program to create two threads ,by using them sort two files using merge sort by using one more thread merge them

Member Avatar for Salem
0
67

The End.