15,551 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] = … | |
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); } } | |
How can i find the curret position of the mouse and then use them in mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0) | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
[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... … | |
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 … | |
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> … | |
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? | |
Goodmorning, Can anyone tell me how to convert a TCHAR to a std::string ?? Thanks.... | |
Can someone start a tutorial about MySQL++ combined with Win32? I would like to learn about that | |
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; … | |
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 … | |
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", … | |
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 … | |
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 … | |
program to create two threads ,by using them sort two files using merge sort by using one more thread merge them | |
I need to create a Windows program which is meant for music students. The main frame needs to contain in the upper part a "word style" page with a partiture displayed, and the toolbar with the controls has to be in the lower part of the window. The idea is … | |
I'm making a program that reads commands from a file and then executes them accordingly... Example: start hide -hides the start button... mbox Hello and welcome The Title -creates a message box would this be called an interpreter, or something else... | |
Hi, I have been looking all over google for a freaking tutorial on code caving. The problem however, 1,000 results shown are crap (I'm sure everyone's shared the same experience). Anyone know of a published tutorial on the concept? Thanks. |
The End.