19,876 Topics

Member Avatar for
Member Avatar for abhi74k

We have two ways 2 access files . Open and its friends and mmap system call . When to use mmap() and what are its advantages?

Member Avatar for gerard4143
0
79
Member Avatar for Maryaa

I am new with allegro.I dont know from where I must study for write pacman with allegro in c.please help first what I must do and from where I can study.

Member Avatar for Maryaa
0
73
Member Avatar for Bips123

Hi, is there a way to avoid the conventional Black Background of C program While its execution? can the fonts be changed or can we include graphics/photos in C so that we can view it during its execution?

Member Avatar for Adak
0
76
Member Avatar for kymarscheng

[U]Which is the best IDE for C?[/U] Currently using Dev-Cpp. I am just wondering if there's any other better IDE around. Eclipse, NetBeans, Dev-Cpp, CodeBlocks or other??? thanks!

Member Avatar for tokenjoker187
0
257
Member Avatar for krisox

hi i would like to group rows in categories like that : [URL="http://img199.imageshack.us/img199/9152/capturegww.jpg"]http://img199.imageshack.us/img199/9152/capturegww.jpg[/URL] I konw how to do this with OutlookGroupBy but its not possible to put the same row into severals categories So is there a way to group rows while beeing possible to put the same row into …

Member Avatar for krisox
0
38
Member Avatar for rajdey1

Hi All I am trying to write Asynchronous client-Server Socket program in which whenever a client is connected to server a Windows Form is created which has a textbox and two buttons......on Data recieved by server from client the data is written in respective windows Form textbox and if a …

Member Avatar for nick.crane
0
206
Member Avatar for c0deFr3aK

Hi everybody please help me on how to code this in C#. I have an ASP.Net Web project and needs some C# code behind. Working some variables: In my VB.Net it looks like this: [CODE] Dim str1 as String Private Sub Button1_Click(...) str1 = "some text" 'This will be assigned …

Member Avatar for Lusiphur
0
149
Member Avatar for NeishaB

How to build an array containing all consonants in a string of lowercase text? No consonant should be repeated in the array even if it occurs more than once and print the number of consonants occurring?

Member Avatar for NeishaB
0
120
Member Avatar for neti1987

hi! I have to check file's permissions, but I'm not sure how should I check the [B]g[/B]roup and the [B]o[/B]ther permissions. I'm not sure I did it right for the group and the user. for the other - I guess I have to use the "S_IROTH" flaf. here is my …

0
92
Member Avatar for iqra123

hello i have a simple client server program in which different paramters are asked by client. i want to use cryptographic techniques like DES, AES, RSA but i do not know how and where to use.... i m doing socket programing first time even programing in linux. so i do …

Member Avatar for iqra123
0
132
Member Avatar for jmangu

Please, someone explain me why when I compile this code in Dev-C++ (Windows OS) the following error message apears: 'clrscr' undeclared (first use this function) int main() { int c; char d; clrscr(); printf(" Example program for PSC232 \n"); setup(); printf("*IDN?\n\r"); send("*IDN?\n"); printf("RECEIVE...\n\r"); loop: receive(); goto loop; } ps: ignore …

Member Avatar for jmangu
0
2K
Member Avatar for vivek01anand

#define prn(a) printf("%d",a) #define print(a,b,c) prn(a), prn(b), prn(c) #define max(a,b) (a<b)? b:a main() { int x=1, y=2; print(max(x++,y),x,y); print(max(x++,y),x,y); } output:222342 pls explain how we get output 342 at end

Member Avatar for lionaneesh
0
131
Member Avatar for fussballer

Hi, I am working on a small program (in Windows) to control the Speed of a CD Drive. So far I have used some of the IOCTL_CDROM_... and IOCTL_STORAGE... Control codes to control the drive by opening/closing it etc. I have now developed a small piece to also control the …

Member Avatar for wisaacs
0
521
Member Avatar for Saxo

Would anyone have a C++ program that will prompt the user to enter the number of students and subjects that have been marked, the user should be able to enter the names of the students and subjects and the user should also enter the associated exam results. The program should …

Member Avatar for meandmyself
-2
525
Member Avatar for gamer42001

Hello, ive been given an assignment to write a program wich will accept possible titles and rearange them in abc order, now beside that the program should also count how many times a title begins with a certain letter. my question is how, or where do i even start to …

Member Avatar for lionaneesh
0
121
Member Avatar for tundra010

Hello everyone! I wrote a basic c++ program using classes and pointers. Although it compiles without any errors, it will not run, saying "This program has stopped working". I am assuming that this issue may have been created by a memory leak, but I made sure to delete all dynamically …

Member Avatar for thelamb
0
114
Member Avatar for babis87

Hello, I'm writing a lexixal analyzer on FLEX, and i want to open an #include file. Calling fopen(yytext,"r"); as shown in flex manual http://flex.sourceforge.net/manual/Multiple-Input-Buffers.html#Multiple-Input-Buffers does not open the file, although that the string in yytext has the value "<filename>". Instead, when i use fopen("<filename>","r") the file opens normaly and the …

0
72
Member Avatar for kulotskii

please help! ineed a C++ program that will read and print the contents of a text file one character at the same time.. please please.. thank you..

Member Avatar for avarionist
-5
140
Member Avatar for DelilahDemented

I'm doing this simple program that checks for number validation and I have an infinite loop in it. I can't figure out how to stop it. It's supposed to check for numeric digits only, but when it finds something other than the above, it hangs up in the loop. Could …

Member Avatar for DelilahDemented
0
237
Member Avatar for mithunp

I am doing malloc(0) and then doing strcpy and then reversing, and its working, why?? and if i dont do malloc(0) and then try to strcpy program carashed as expected, but how does malloc(0) making a difference.[code]#include <stdio.h> char* reverse(char *data); void my_Strcpy(char* dest,char* source); main() { char* p_Name = …

Member Avatar for Dervish1
0
216
Member Avatar for jmangu

I'm trying to find the curses.h library over the internet and so far I haven't any luck. Please help me sending the code for Windows OS. Many thankx in advance. jmangu

Member Avatar for jonsca
0
126
Member Avatar for bbman

Hey, I apologise for the noobishness of this question, but I am unable to move the form. [CODE] if (Screen::PrimaryScreen->Bounds.Top != Screen::PrimaryScreen->WorkingArea.Top) { this->Left = Screen::PrimaryScreen->Bounds.Right - this->Width; this->Top = Screen::PrimaryScreen->WorkingArea.Top; } else if (Screen::PrimaryScreen->Bounds.Left != Screen::PrimaryScreen->WorkingArea.Left) { this->Left = Screen::PrimaryScreen->WorkingArea.Left; this->Top = Screen::PrimaryScreen->WorkingArea.Bottom - this->Height; } else { this->Left …

Member Avatar for jonsca
0
130
Member Avatar for michellemullen

I've got a C assignment to make a "Rolodex" project. I wrote out the whole assignment just so you would understand the scope. I'm just getting going on this. Last week's lecture was about Dynamic Self Referential Lists in C, so I get the concept of what I'm supposed to …

Member Avatar for ravi.d
0
328
Member Avatar for amandeepsinghvi

Hello Friends, I was just writing a program in C. In this program i was trying to give the rotation affect like the for pie-slices are moving. [CODE] #include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> int main(void) { int gd=DETECT,gm,i=1,count=1; initgraph(&gd,&gm,"d:\\tc\\bgi"); do{ i=count%2==0?2:1; setfillstyle(1,i); delay(500); pieslice(319,239,20,60,100); //A1 i=count%2==0?1:2; setfillstyle(1,i); delay(500); pieslice(319,239,120,160,100); //B1 i=count%2==0?2:1; …

0
28
Member Avatar for carrythe1

Hi, I know the code for this post is quite long, but I thought it would be best to be comprehensive about what i'm trying to do as i'm not exactly an expert in this area of programming. I'm stuck trying to work out how to get windows hook procedures …

Member Avatar for carrythe1
0
2K
Member Avatar for amishosh

Hi! I copied and pasted a grapics.h example from the help>index in borland C. When I try to run it the compiler gives me 9 error messages, all going something llike this: Linker error: Undefined symbol _closegraph in module "my file name" here's the example: [code] #include <graphics.h> #include <stdlib.h> …

Member Avatar for leduduong
0
430
Member Avatar for genie0582

I tried to debug Macro variable but i cannot. I use Dev c++ [CODE]#include<stdio.h> #define TIME 5 int main() { int i=TIME; printf("%d",i); }[/CODE] when I run it, of course it gives correct result. but when I debug, it reports "TIME = not found in current context"

Member Avatar for Adak
0
106
Member Avatar for morelve

I want to make a native win32 program that simply moves the cursor to x=100 y=200 on the screen, and then clicks the left mouse button once. Where do I start? For once, Google got me nowhere. I use VC++ 2010 to compile.

Member Avatar for Adak
0
3K
Member Avatar for angelrapunzel

hi frnds!! i have d code for series x^!+x^2+x^3+....x^m with single loop only //wap to find sum of series and print series also //x+x^2+x^3+......x^n #include<iostream.h> #include<conio.h> void main() { clrscr(); int n,x,count1; int sum=0; cout<<"enter a number"; cin>>x; cout<<"enter nth term till which u want to compute"; cin>>n; int count=1; …

Member Avatar for NathanOliver
0
111
Member Avatar for ashish2234

I know its silly but once i tried this and output is not what it should be.. [code] #include<stdio.h> #include<conio.h> int main() { int i=0; i=i++; printf(i); } [/code] i MEAN post increment will store a value, say 0 here.and then increment but that value is given to the variable …

Member Avatar for genie0582
0
310
Member Avatar for Madawar

Hi, I recently started using Linux and have come to find that it suits me better than Windows. I am a newbie in C/C++ programming and my questions are [LIST=1] [*]How suitable is Linux for learning C/C++ programming as most of the books i have come across are based on …

Member Avatar for lionaneesh
0
125
Member Avatar for n30h4x

My question is how would I implement sending arguments to a program running in the background? Can anyone point me in the right direction?

Member Avatar for n30h4x
0
205
Member Avatar for noobuser

hi guys is it timeconsuming to use memset instead of for? i mean suppose we have an array of int int prime[200000]; we use memeset(prime, 200000, 0, sizeof(prime)) also we can use for(i = 0; i < 200000; i++) prime[i] = 0;

Member Avatar for Ancient Dragon
0
207
Member Avatar for riyasahamed

please any one give me simple code snippet to perform insert , delete, update, search & display operation using linked list. please help me

Member Avatar for lionaneesh
-1
128
Member Avatar for grii_19

write a general purpose function to convert any given year into its roman equivalent . the following table shows the roman equivalent of decimals number decimal roman 1 i 5 v 10 x 50 l 100 c 500 d 1000 m eg:- roman equivalen of 1988 = mdcccclxxxviii ---||-- ----||----- …

Member Avatar for leeyaviswanath
1
1K
Member Avatar for Hawking

Hi i am looking for program that reads and counts chars, lines(rows), numbers and other characters from file test.txt and puts results on screen. Thank you for help I am not a programmer and dont want to do anything with it just need it now thank you.

Member Avatar for kiran002
-3
109
Member Avatar for vddmanikanta

Sairam all, Linux Man pages say > "LinuxThreads currently does not support process-shared > semaphores, thus!sem_init! always returns with error !ENOSYS! if > |pshared| is not zero." > > I have a shared memory area I need to lock(using semaphore). Is there a Linux preferred > method to share semaphores …

Member Avatar for ihedz
0
127
Member Avatar for Hawking

Hi imagine that I have serie (progression) like Ai=2Ai-2 - 3Ai-1 for i>=2 (i-2 and i-1 are lower indexes) A0= 2.5 A1= 1.2 I need a program which counts and write into the field values from 0-19 and after the program frint sum of these values to screen. Thank you …

Member Avatar for kings_mitra
0
105
Member Avatar for anu07

A question has been knocking my mind today,is it possible to convert a executable file back to its source code in c++??

Member Avatar for anu07
0
118
Member Avatar for akand

Hiii.... I am stuck here.. I want a function which can return a string and also it should be able to take DEFAULT string arguments.... can anyone help me wid d syntax??

Member Avatar for nbaztec
0
241
Member Avatar for vipin.sachan

In a 'C' program,when I am trying to allocate memory with the help of malloc () function, it is allocating the memory up to a certain limit for e.g. in my case, it is 670 MB (approx). malloc() returns NULL if I allocate more than this amount of memory.When I …

Member Avatar for mitrmkar
0
188
Member Avatar for moshe12007

i have in the Visual C# 3 options of database : 1. SQL SERVER (.sdf) 2. ACCESS (.mdf) 3. ADO.NET (.edmx) which database advisable to use??? *if you give me answer please give me tutorial\book\name of book. thanks.

Member Avatar for kvprajapati
0
174
Member Avatar for hqt

I want to make a Desktop Effect (for example: fallen leave, snow,... on Desktop) but I don't know how to do that (one of these problem is: how can I do "something" on Desktop, because every program that I had programed run in a window) Who can discuss this problem …

Member Avatar for nbaztec
0
101
Member Avatar for prabindatta

[CODE] #include <stdio.h> #include <stdlib.h> struct amicable { int** amicablePair; int size; }; struct amicable *getAmicablePairs(int startnum, int endnum); int sumFactors(int number); int main(int argc, char** argv) { int startnum = 220; int endnum = 284; struct amicable* ami; int i; ami = getAmicablePairs(startnum, endnum); if(ami==NULL) { printf("Error: malloc could …

Member Avatar for arpit1109
0
116
Member Avatar for samaru

If you're doing programs for academic reasons, this is a good site to go for C++ information. Good for snippets. Used it a lot through classes. http://www.mvhs.net/~rkrane/clecs/

Member Avatar for kvprajapati
0
1K
Member Avatar for anjoz

help on this enrollment system in cprogramming when I run the programming the output sometimes fall through example when i enter the student number name and address but when i press enter in the address it skips the scanf in the status and goes to the gender it alse does …

Member Avatar for Adak
0
2K
Member Avatar for TomB1988

Hi there, The program in hand must retrieve a bunch of data from an SQL Database (currently stored in a DataTable), fiddle around with the data, and then upload the changed data to the same SQL database. Everything works fine at the mo apart from the final bit, uploading to …

Member Avatar for microdata
0
144
Member Avatar for bushman_IL

Hello, I am trying to send an object over a socket using C#. I originally used a memorystream and binaryformatter, but to do this I need to include a reference from program1 to program2. I don't want to have a reference, so I just want to be able to transform …

Member Avatar for bushman_IL
0
1K
Member Avatar for loly

hey guys .. ausome forum ... i know the basics of c programming but i am going on to the next level and i am having some diffculties ..with multi-threading ... theres this program i read but i couldnt solve ,, hope some one here knows how to help me.. …

Member Avatar for raviranjanprasa
0
2K
Member Avatar for moshe12007

i dont know how to read from database SQL. i try this : [CODE] string sql = "Select * from Table1 "; DataSet ds = new DataSet(); string connStr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"; SqlConnection conn = new SqlConnection(connStr); SqlCommand cmd = new SqlCommand(sql, conn); conn.Open(); SqlDataAdapter adapter = new …

Member Avatar for nick.crane
0
99

The End.