19,876 Topics
![]() | |
Dear All. I have a small problem with the code attached. I am trying to add an object to a linked list. When I try to compile I am getting an error. For the life of me I cant figure out the error. this is after 5hrs of head wrecking … | |
hello people... I don't know what to do and how to do to improve my programming skills. i really need your help , advice and suggestions... you see i have been studying programming for a few month and since the time i started i just read and had very few … | |
ok so here is what im doin. Given a square matrix, write a program that determines the number of white(numbered) blocks and total number of squares in each of the white blocks. By definition, the outside boundaries of the matrix must be shaded(0). A block of white squares consists of … | |
hi I'm trying to create a program in c that reads in words and prints them out backwards, e.g. hello would become olleh. I want to do this using a linked list and getchar to get the characters. I know I need to insert each single character at the start … | |
Hello, instead of using an array of objects I'm wanting to use an link list of objects. Could anyone point me in the directions? One class is called: Personal information... The other is my link list. I'm stuck on how to get the link list to take an object as … | |
If you would be so kind to go to this url, where I have already posted my problem and give me some tips on this forum or on the one already posted: [url]http://www.linuxquestions.org/questions/showthread.php?s=&threadid=387067[/url] Thanks in advance, P.S. This is really urgent, and it is probably a small problem. Some updated … | |
Having strange behaving programs,at the bottom you can find them, but here is short explenation. Main program will present a menu from which you can pick operation to do. When I choose 1 it is suppouse to create file of certain name(not exactly, you have to complile score.c program and … | |
Does anyone know wether i can convert a Java written program to C? Thank You | |
what is the target of pointer to function? when do i use pointer to function? :?: | |
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> … | |
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 … | |
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 … | |
Can anyone point me in the direction of a site that has a good tutorial on using Tab Controls on a MFC program? | |
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); … | |
I just finished a simple slot machine program. It displays 3 random numbers from 0 - 9 next to each other. I'd like to "soup" it up. Is there some way I can make each of the the numbers spin and stop sequentially. thanks | |
| |
[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 … | |
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 … | |
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 … | |
I am trying to output a number of lines, given by the user, of stars shaped as a triangle below: [code] ********* ******* ***** *** *[/code] i have got the following code: [CODE]void line (int n, char c) { for (int i = 1;i <= n; i++) { for (int … | |
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 … | |
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 | |
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 … | |
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 … | |
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] … | |
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 … | |
Hey guys, I'm new here, seeing as this is a C++ forum I was wondering if someone could help me out with a C++ assignment I have. I need to make a word counting program. Here is what I need: [url]http://desertonline.net/classes/cs89a/zbecker/files/Assignments/WordCount.htm[/url] Username: cs89a password: ctwo Anyone who completes this project … | |
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 … | |
#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 … | |
Here is my program with the errors any help would be appreciated. error C3861: 'headTail': identifier not found, even with argument-dependent lookup error C3861: 'results': identifier not found, even with argument-dependent lookup error C2365: 'headTail' : redefinition; previous definition was a 'formerly unknown identifier' error C2365: 'results' : redefinition; previous … | |
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 … | |
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 … | |
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 … | |
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 … | |
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"); // … | |
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 … | |
I have win2000,sp4 machine that when a user is logged on and they share the c drive as c$ it will change back to unshared after the machine is rebooted. The machine has a CD-Rom drive D shared as D$ which is not affected by it. It also doesn't seem … | |
Since i have to go to college i got on idea to preform a simple C# Syntax highlighting for my HP ipaq 1710,dont laugh at me when i tell you that i tried to create just window form without anything else and copy it to my Pocket PC,i use windows … | |
hi! i use tcpclient to get connections from clients to my server. but i need the information of the ip address of that client. i know that i have to derive a mytcpclient from the tcpclient class, but i get some errors when extracting the socket out of it. the … | |
how i print the output of the c programming code in a printer and using c code? Like output is hello and also print the message Do u want to print it ? if i press yes it would be print in printer. please get me the c code of … | |
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 … | |
[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? … | |
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( … | |
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 … | |
Explanation is a bit long so please bear with me, solution is short :lol: We got an assigngment from uni to create word dictionary program to read an external file where each line consist of WORD and DEFINITION separated by empty space. If some word exists more than once add … | |
Hi everyone I am really having trouble right now with oracle for linux. Please tell me how to connect oracle using c/c++ in linux. If anyone knows about any tutorial or have code, please plzzz post me that as well. | |
Hey all. I'm still trying to get use to how to work with rand. I'm just messing around with it to try and get good and comfortable with it. Working with a variable whose value starts out at 0, I want to try three different paramaters on it. 50% of … | |
The latest POTM contest is underway ... if you haven't participated before, the POTM is purely for fun and presents a programming problem to enjoy every couple of months. We have an active forum and a mix of 1300 participants from novice to expert. POTM winners receive the glory and … | |
Hi, We are working on an assignment where we have to use haptic interface and VRML file. This assignment also asks us to include a sound of the VRML image which we are using. Could anyone please help us as to how to code in C language to upload winamp … |
The End.