15,552 Topics

Member Avatar for
Member Avatar for nabil1983

Does anyone know wether i can convert a Java written program to C? Thank You

Member Avatar for hollystyles
0
115
Member Avatar for SNA

what is the target of pointer to function? when do i use pointer to function? :?:

Member Avatar for dwks
0
65
Member Avatar for ToySoldier

Need help in finishing this problem. I was doign ok at first but somehow ran into 2 compile errors. Now I'm tired and going in circles. I need a fresh pair of eyes to look it over. This is my first time doing arrays. [code]#include <iostream> #include <string> #include <iomanip> …

Member Avatar for perniciosus
0
223
Member Avatar for drew010

ive made a dll in c, and it gets called with visual basic. in vb one of the parameters i pass is the address of a vb function. i can get the dll to run the function fine, but i need to put that address into a struct to pass …

Member Avatar for perniciosus
0
110
Member Avatar for 123abc

For research, the admissions office wants to compare how well female and male students perform in certain courses. You are asked to write a program that prompts the user to enter a number of student records consisting of (a) student’s sex (‘f’ for female, ‘m’ for male) and (b) GPA …

Member Avatar for WolfPack
0
252
Member Avatar for atrusmre

Can anyone point me in the direction of a site that has a good tutorial on using Tab Controls on a MFC program?

Member Avatar for atrusmre
0
175
Member Avatar for HyperEngineer

I would like to change the font in a static text box. But I want it to be that size until I change it again. I put the following code in the OnInitDialog() function: [code] CWnd* pWndControl = GetDlgItem(IDC_PROGRESS_INDICATOR); pWndControl->MoveWindow(((MyRect.right - MyRect.left)/2) - 100/2, MyRect.top + 100/2, 100, 100, TRUE); …

Member Avatar for WolfPack
0
99
Member Avatar for snaidis
Member Avatar for Narue
0
374
Member Avatar for shahid

[I]This post has been edited by your friendly neighborhood forum nazis[/I] [url=http://www.daniweb.com/techtalkforums/announcement8-2.html]We don't do homework![/url] [url=http://www.catb.org/~esr/faqs/smart-questions.html#homework]We're not stupid![/url] There are two things you lack: honesty and integrity. As these are desirable traits for a student, I suggest you forget about programming and pursue a career in politics. Chances are good …

Member Avatar for perniciosus
0
94
Member Avatar for atrusmre
Member Avatar for comwizz

Hi everyone, I am having this problem to define a function which raises a float y eg 3.5 which is not a whole number to the base x. Heres the code which gives domain error as function pow takes only int values. [code]//Program to raise a number to power when …

Member Avatar for jim mcnamara
0
369
Member Avatar for atrusmre

What is the best way to save to a file using a MFC Dialog based program? I need it to output mutipule data type (CString, int) to a file. I also need it to read the data from the file to update the controls (i.e. an options dialog). I've tried …

Member Avatar for Daishi
0
163
Member Avatar for snaidis

i am doing a program that solves a math exercises with order of arithmetic operations for example: 2*(7-6*4+(11-6)+(14-5)) now, the user types number or character(*,-,+,/) i have a struct that contains one int variable and one char variable the user types character or number and i need to put the …

Member Avatar for SpS
0
173
Member Avatar for Muralish

hai friends Can u please gv me some refernce to sites which will be helpful for me to write program for sending packets cointinously to ethernet card.My prorama should accept the data. Waiting for ur replies From Muralish

Member Avatar for WolfPack
0
52
Member Avatar for Loopah

Heya everyone. I am a first-year student and doing a project for my C class. It is to do with John Conway's "Game of Life" as I am sure you are all aware of what that is. Here is the things needed. And after that is the code that I …

Member Avatar for Loopah
0
627
Member Avatar for vicky_dev

I came across this problem in one of my test papers. It says : Write a program that deletes itself( the exe file ) when run. Here's my first attempt and it didn't work, so I added the error-checking code. [code] /* This program tries to delete itself */ #include …

Member Avatar for WolfPack
0
218
Member Avatar for HyperEngineer

I'm trying to get the coordinates for the client section and the whole window. This is the code, but it gives me the same top, bottom, left and right for both the client and the window. The files are: T1NIU.h T1NIU.cpp T1NIUDlg.h T1NIUDlg.cpp This code is in the T1NIUDlg.cpp [code] …

Member Avatar for WolfPack
0
128
Member Avatar for LordJayno

i'm trying to convert a string into an integer by using atoi() function. but it gives me an error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot …

Member Avatar for LordJayno
0
110
Member Avatar for Savage221

Sorry for the rather newbish question. I'm stuck on part of this program, it seems simple enough :-| The user is prompted to enter a phone number in the format of: xxx-xxxx (the hyphen must be included). From there the phone number needs to be stored into an array of …

Member Avatar for Savage221
0
296
Member Avatar for Chinjoo

#include<stdio.h> #include<conio.h> struct node { int data; struct node *right, *left; }*root,*p,*q; struct node *make(int y) { struct node *newnode; newnode=(struct node *)malloc(sizeof(struct node)); newnode->data=y; newnode->right=newnode->left=NULL; return(newnode); } void left(struct node *r,int x) { if(r->left!=NULL) printf("\n Invalid !"); else r->left=make(x); } void right(struct node *r,int x) { if(r->right!=NULL) printf("\n Invalid …

Member Avatar for Cudmore
0
367
Member Avatar for stabule

Hi all. I need help creating a prog. in C that can count the occurrence of numbers. The prog. should go like this: Enter input 1 = 223335 Enter input 2 = 2 Output = The number 2 appears twice in "223335". The first input can be any 6 numbers …

Member Avatar for winbatch
0
214
Member Avatar for arun_kumar_c

hi guys , I am a first year student! can anyone help .. the code. is . [COLOR=RoyalBlue]main() { char *b="abc"; printf("%s",b); }[/COLOR] the output is :abc. my doubt is : how can we assign a string constant to a pointer.And when we assign like this is a character array …

Member Avatar for SpS
0
229
Member Avatar for Cudmore

You heard me, I want to know your guys' techniques for converting data types without using additional headers (such as studio.h). Are there any tricks or intrinsic methods? Can I write my own method? I simply don't like adding unnecessary headers becasue I don't use 95% of the crap that …

Member Avatar for Cudmore
0
194
Member Avatar for vicky_dev

This is really simple code that prints the address of a variable : [code]int main() { int x; scanf("%d", &x ); printf("Address of x : %X, value : %d" ); return 0; }[/code]<< moderator edit: added [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code][inlinecode][co[u][/u]de][/co[u][/u]de][/inlinecode][/url] tags >> Simple as that. But the thing is this program gives the …

Member Avatar for vicky_dev
0
295
Member Avatar for HyperEngineer

I'm trying to put a status bar on a dialog based app. I have the following code in the OnInitDialog(): [code] if (!m_wndStatusBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } else MessageBox("Status bar created", "Debug"); // …

Member Avatar for HyperEngineer
0
170
Member Avatar for marox

I am developing an application that interefaces with a roll printer. When I am using the printer specific fonts, I am capable of send out a partial cut automatically once the document is finished (I am using the CDC class) Through my searchings of the internet, I have stumbled upon …

0
51
Member Avatar for Splink

Hey guys and girls, im a n00b at the programming side of PC's but im trying to create not a pop-up but a sub window? does that make sense? like when you get an error message or when you get an information box up! can anyone help me with basic …

Member Avatar for Ancient Dragon
0
92
Member Avatar for jack223

[code]class Thing { public: int Item; Thing (int Value); Thing (int Value1, int Value2); int GetValue1 () const; int GetValue2 () const; private: int DataItem1; int DataItem2; void SetValue1 (int Value); void SetValue2 (int Value); }[/code]<< moderator edit: added [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code][inlinecode][co[u][/u]de][/co[u][/u]de][/inlinecode][/url] tags >> How many member functions does class Thing have? …

Member Avatar for jack223
0
117
Member Avatar for needCee

Hi, now i have work on it for a long time it is working but, when it can not find the item any how it will print item not found + item found , i have no idea what is wrong any help welcome, thanks [CODE] .... ... .. if( …

Member Avatar for Ancient Dragon
0
93
Member Avatar for smicer

Greetings, i have been having problems trying to read from files using c programming. i succeeded in reading from .txt files and playing with the contents but i can't read al the contents of any .jpg or .doc file. please how do i go about this. i hve not tried …

Member Avatar for Daishi
0
120

The End.