19,876 Topics

Member Avatar for
Member Avatar for ankit_rastogi82

I made a Cpp application wihich links with shared objects. But when I runs the application, it crashes surprisingly before entering into the main() control block. After trying with gdb I came to know it is crashing while reading symbols from a library. GDB says something like Reading symbols from …

Member Avatar for WaltP
1
78
Member Avatar for linq

look at "dc.SelectObject(&pen)" and "dc.SelectObject (&brush)",here no matter I use "&" or not it results the same. why is that? [code] void CMainWindow::OnPaint () { CPaintDC dc (this); CBrush brush (RGB (255, 0, 0)); CPen pen (PS_NULL, 0, (RGB (0, 0, 0))); dc.SelectObject(&pen); dc.SelectObject (&brush); dc.Ellipse (0, 0, 200, 100); …

Member Avatar for Ancient Dragon
1
90
Member Avatar for linq

the following code is from the examples on the book CPen pen (PS_SOLID, 0, RGB (192, 192, 192)); CPen* pOldPen = dc.SelectObject (&pen); //do some drawing staff here dc.SelectObject (pOldPen); I know once I create a pen, I can do some drawing staff, but why should I add "CPen* pOldPen …

Member Avatar for Ancient Dragon
1
123
Member Avatar for rati

hi can anyone tell me please what is segmented error , i have made a program in c on linux and when i am running it after compiling , after a few inputs it shows segmwntwd erroe. what is this??:?:

Member Avatar for rati
2
91
Member Avatar for saravana_ssk

Hi, I have a basic doubt about C compiler option. I have 10 functions in my environment and I want a particular function to go into a new section which will be defined in a file where the function is defined. My question is: Can we define a seperate section …

Member Avatar for Salem
0
102
Member Avatar for Deepak Ram

Can anyone guide me as to how to implement a routine(in C) similar to getpid() in C.

Member Avatar for Ancient Dragon
1
52
Member Avatar for lilprogrammer

Hi, I am trying to convert a string length to a char and store it in an array. For some reason, even though its not giving me any error, when I try to print the array out, the place where I store the strlen is blank. Here's my code: [code] …

Member Avatar for andor
1
397
Member Avatar for champos

Hi, I have a question which i have no idea how to do manage. I need to convert a string in the format like "1 234 567" so i can do some calculations on the indvidual numbers. What is the best way to do this? Thanks

Member Avatar for ~s.o.s~
0
2K
Member Avatar for hariza

Hi Guys, I know this will be easy for anyone here and it might take 2 minutes to right the code. I wonder if someone can help me to right a loop using strtok() to be able to extract the words form a string like "various systems analyze the model …

Member Avatar for WolfPack
1
1K
Member Avatar for weltonalicia

How do you start to write a program when you are asked to use an output statements to print three first letters of your first name in big blocks. I started off with. #include " stdafx. h" #include <iostream> using namespace std; int main () { // Statement Cout << …

Member Avatar for FireSBurnsmuP
0
67
Member Avatar for bg123

I am doing a mazetraversal program that inputs a .dat text file. Im having trouble taking in account of the whitespace. Here is my code and were the ?????? is where it needs to go. I think its just a small "if" statement taking it in account. [CODE]#include <iostream> #include …

Member Avatar for Lerner
1
129
Member Avatar for VinceColeman

I have to use a variable of type double to store and manipulate a value for an amount of years. This means I have to ensure that the data input by the user is an integer. The program will accept a non-integer value, but I want it to continue reprompting …

Member Avatar for FC Jamison
1
187
Member Avatar for seeppms

I am using filepointer in C. when I compile the code and run it for the first time the filepointer works fine and logs are written into log files. But during next hits there is an inconsistency in logs getting written. sometimes getting written and someother times not written. But …

Member Avatar for WaltP
1
161
Member Avatar for bhushanm

hi, in my code i am creating a tree, which have a 20 levels and and each level we have 10 nodes. i.e every node can have a 10 children. for them i am allocating memory for each node. each node is stracuture which occupies the memmory around 40 bytes. …

Member Avatar for jim mcnamara
1
168
Member Avatar for Garadan5567

Is it possible to somehow reprogram a Coke/Water/Pepsi w/e machine to dispense drinks at a lower cost or just plain out give them to you? Just by like pushing some selections on the panel?? I saw it on the news someone did it so an ATM machine gave out double …

Member Avatar for Salem
-1
99
Member Avatar for pradeepmisra

Hi guys i m new for Symbian series 60, I want to know the how to write the code to listen to a particular folder, so that if any changes happens to that folder then the application should popup a message box.

Member Avatar for Salem
1
46
Member Avatar for beginerprograme

this is a program that i have to write. followed by the code i already written. Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical price of a stock. The program will allow users to query the stock price …

Member Avatar for ~s.o.s~
1
133
Member Avatar for pradeepmisra

Hi guys i m new for Symbian series 60, I want to know the how to write the code to listen to a particular folder, so that if any changes happens to that folder then the application should popup a message box.

Member Avatar for andor
0
209
Member Avatar for Iqbal_h_a

I have a doubt on function returning a value. Consider the following program snippet. [code] int add(int a,int b) { int c=a+b; return; } int main() { int a=10,b=20; printf("%d %d %d",a,b,add(a,b)); return(0); } [/code] The above program gives the output as 10 20 30 But the function is not …

Member Avatar for Iqbal_h_a
0
119
Member Avatar for hariza

Hi Guys, Just wondering I'm newbie writing C programs and I don't expect to get the entire code here but I was allocated a task/assigment to create a C program that emulates a search engine so I was given a bunch of text files that contains HTML data and I …

Member Avatar for hariza
1
93
Member Avatar for nagarjuna

I m Nagarjuna doing my engg in comp sci. I m preparing for GATE -2007 to pursue Mtech in any of the IITš. Does any of u ve the materials for GATE

0
70
Member Avatar for linq

I want to create my own cursor image by importing an exsiting .ico file, but every time the VS6.0 automatically imported it into resources as ICON file, even I name it as IDC_CURSOR1, I can not use " wndclass.hCursor = LoadCursor (hInstance, MAKEINTRESOURCE (IDC_CURSOR1)) ;" to create my own cursor

Member Avatar for WolfPack
1
96
Member Avatar for poorni

:?: haiii iam a student from engg college... i juz have a lab on compilers.. i have a program called conversion of Regular expression to NDFA.. can u plz help me with de source program... in C:?: :?: :idea:

Member Avatar for Karthi Msc
1
156
Member Avatar for chunkmartinez

Im wanting to create a simple command line prog, and i want it to randomly change the desktop background by simple commands using the registry but i cant find out anyware on how to change desktop bg with registry. does anyone know?:twisted:

Member Avatar for WolfPack
1
68
Member Avatar for stupidenator

Hi, I am in need of some help with a small portion of my program. I have an input file as follows: [CODE]10 9 15 program1 11 1 30 important 12 11 10 junk program 14 15 5 other program 17 6 20 another program[/CODE] I need a function to …

Member Avatar for stupidenator
1
173
Member Avatar for Ajay Raj

Hi, Could any one please let me know if we can connect to database using C, and if yes let me know the functions in C used to send the SQL statements in the buffer to SQL server.

Member Avatar for Ajay Raj
0
118
Member Avatar for Kadaj

Ok, i have a friend that has come to me for help with her comp and i have no idea how to solve this one. When she starts her computer (laptop w/ Windows XP) a dos-looking screen comes up after a short wait and says that the file "C:\WINDOWS\system32\config\system" is …

Member Avatar for DMR
0
215
Member Avatar for amano

Hello I'm newbie in C programming. Iwant to make a simple contact book that have add, delete, edit, and display function. 2 out of 4 i've done which is add and delete. So I need some help from all of you in edit and list function. Here is my function …

Member Avatar for Dave Sinkula
0
1K
Member Avatar for jan1024188

im linux user!!!! how to run this script? [QUOTE] int main(void) { printf("Hello world!\n"); return 0; }[/QUOTE] its written with emacs what to do? is there any programming tool in linux for C programming?

Member Avatar for jan1024188
0
193
Member Avatar for rxgmoral

CString Convert to LPCTSTR i write DLL file,it is static dll i want CString type Convert to LPCTSTR but error Code: <<<<<<<<<<<Dll File>>>>>>>>> <<<<<<<A.H>>>>>>> class AFX_NOVTABLE dll { public: __declspec(dllexport) LPCTSTR Fun(); }; <<<<<<<A.Cpp>>>>>> LPCTSTR dll::Fun() { CString Rxg=_T("rxg"); LPCTSTR lpszStr=Rxg.GetBuffer(); return lpszStr; } <<<<<<<<Exe>>>>>>>>> #pragma comment(lib,"dll.lib") #include "A.h" .................. …

Member Avatar for rxgmoral
1
189
Member Avatar for linq

by adding these code to the case WM_PAINT: hdc = BeginPaint(hWnd, &ps); MoveToEx (hdc, 100, 100, NULL) ; LineTo (hdc, 100, 200) ; EndPaint(hWnd, &ps); why can I adding them to the case WM_CREATE to realise it?

Member Avatar for Ancient Dragon
1
71
Member Avatar for gampalu

Hi, can you please indicate me some ebooks about C for beginners, thanks

Member Avatar for gampalu
1
94
Member Avatar for dsraju

Hi all,I am having some doubts in C. 1>> My program needs to allocate memory of 256*256 array of integers ie array[256][256]. But it cannot be allocated statically.So pls suggest me how to allocate memory of 256*256 integers dynamically.My code below given is unable to allocate memory and is returning …

Member Avatar for Iqbal_h_a
0
308
Member Avatar for the.future.zone

Hi guys. Hope all is well. There's another concern too. If one is to write a code in which a number would be changed into its binary equivalent, and the binary equivalent would be printed, how does one untie this knot? [CODE] #include<stdio.h> main() { int n; /* the number …

Member Avatar for rinoa04
1
113
Member Avatar for dsraju

Can any one say, In which case Null Pointer Assignment is displayed on the output screen in a C programming ?Hoping ur answers .............Urs Raju

Member Avatar for dsraju
0
74
Member Avatar for FrstratdProg

Hello, everyone. Since I am new to this site, I have both a question to ask regarding the subject tags, and also about a while exercise I am working on. However, before I state the while exercise, I first need to know exactly how one uses the subject tags to …

Member Avatar for Dani
1
100
Member Avatar for govinda.attal

[code] int main() { int var; char string[50]; (var, string); (0); (0, 1, 2); return 0; } [/code] Reply ASAP Thanks in advance Govinda Attal.

Member Avatar for andor
1
205
Member Avatar for ariyan

How to store a 64 bit value into 2 unsigned long variable (of 32 bit)? Let, [code]: unsigned long a; // variable 'a' will be incremented regularly and 'll be stored in b void fun(void) { unsigned long double b; // It may be a global variable b += a; …

Member Avatar for ariyan
1
132
Member Avatar for Fabii23

I am getting this error: .c:28: warning: assignment makes integer from pointer without a cast -any fixes thank you [code]#include <stdio.h> #include <string.h> void addValue(); void changeId(int data, char *name); int main() { addValue(); changeId(2, "Bill "); getchar(); return 0; } struct Node{ int data; char *name; }node; void addValue() …

Member Avatar for Ancient Dragon
1
92
Member Avatar for himanjim

unsigned int a =0xffff; ~a; printf("%x",a); gives output ffff Complementing function works here. What's use of 0x in 0xffff as unsigned int is of 2 bytes only??? Can anybody suggest???

Member Avatar for Dave Sinkula
1
539
Member Avatar for dsraju

Hi everbody,My below program is running successfully ,but at end it is displaying Null Pointer Assignment as output. Why ??? [code] #include #include int main(){ float far **ptr; /* For 2-D array dynamic allocation*/ register int i,j; ptr=(float far**)calloc(256,sizeof(ptr)); if(ptr==NULL) { printf("\n No Memory! "); return 0; } for(i=0;i[/code]

Member Avatar for ~s.o.s~
0
146
Member Avatar for whitemoss

Hi All, I've write a code for client and server. It works well so far but the server just acknowledge the client of what it received. How to recode this program to make sure that once server acknowledged the client that the data sent by the client have been append …

Member Avatar for whitemoss
1
143
Member Avatar for linq

another question: when I create a window, I use function CALLBACK WndProc(), if another dialog box will be triggered by clicking a certain button in this window, I may use another function CALLBACK DlgProc(). if there is other more, I may use another CALLBACK DlgProc().... could I integrate all those …

Member Avatar for GloriousEremite
0
414
Member Avatar for Gigs_
Member Avatar for ~s.o.s~
1
99
Member Avatar for the.future.zone

Hello guys. Thanks for the help in the previous posts. This one is regarding pointers in C language. Does 1) c = *a and 2) *a = c mean the same thing? I think they are. Are they? Thanks for the reply.

Member Avatar for ~s.o.s~
2
119
Member Avatar for linq

pop out so many errors, which seemed don't even exist: --------------------Configuration: 12 - Win32 Debug-------------------- Compiling... StdAfx.cpp c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2143: syntax error : missing ';' before '.' c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : error C2501: 'winuser' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\winuser.h(3) : …

Member Avatar for ~s.o.s~
1
320
Member Avatar for nhandal

Hi, I am trying to create a treeview control in a window that includes a toolbar and a status bar, I need to position the treeview immediately below the toolbar. In order to do this I need to calculate the height of the toolbar and used it as the Y …

Member Avatar for nhandal
1
105
Member Avatar for linq
Member Avatar for Ancient Dragon
1
107
Member Avatar for Killer_Typo

howdy all, im just looking for some good websites that list all of the controls in C# that list the various ways of interacting with a MySQL database through C# through a website. While i normally use PHP for this type of thing i would like to expand my horizons. …

0
72
Member Avatar for linq

the MSDN description: hIconSm: Handle to a small icon that is associated with the window class hIcon: Handle to the class icon. But I still confused! when I creat a window "WNDCLASSEX wc", I could always only see the icon load by the wc.hIconSm when excuting, where to find the …

Member Avatar for GloriousEremite
1
95

The End.