51,593 Topics
![]() | |
In class we did a program on moving a round object up and down on a form,we finally figured it out but what i want to know is there are another way of shortening the coding instead of tesing using boolean :( | |
just curious why this isnt working... its probably simple.. but its a friday so im allowed to not access my brain as much... anyways... i want to input a string then switch that to a char array then switch back and print reversed string this doesnt work... debugger stops it … | |
Hi to everybody! Here I paste some simple exercise code that I wrote. The errors are pasted from the compiler log at the end of the source code. The add() function looks ok to me and I can't understand what the compiler wants from me :o Thanks! [CODE] #include <iostream> … | |
Hello all, I'm working on a program using MFC and VS6, and when I split my program into files (aka: move certain portions to a new file for easier reading and such), I get this error: [code] error C2065: 'IDD_DIALOG' : undeclared identifier error C2057: expected constant expression [/code] Here's … | |
hello all . well its pretty simple but i need to get this for loop sorted before i can move on. #include <iostream.h> void square(); void circle(); void arrow(); void diamond(); using std::cout; using std::endl; void square() { //first line for (int e = 1; e >= 9; e++) { … | |
I am working on displaying the amount ofodd numbers in this array. It always says there is 5. That is not correct. When I use the debug it shows that it is placing a different value in the myArray and using that to determine the amount of odd numbers. Please … | |
hi, I'm working on a project and I'm almost done. However, I'm having a few problems with the prices. this is the guide for the project: Airplane Seat Allocation System Write a C++ program for the following task using modular approach. a) 48 seats in 12 rows with a Aisle … | |
hi, I am a newbie learning c++ ..I would like to know how Images r loaded in C++ and if it can handle and execute basic image manipulations and also filters ,also whats the maximum amount of bitdepth for images (if there is a upper threshold) that can be handled … | |
Hiya, Does anyone know of linking Java with Fortran under Windows OS, preferably Windows XP? Can anyone give a short example including code? I have found pretty good examples of using Java-JNI-C/C++ works pretty well. I am using Dev-C++ compiler. I look forward to hearing from someone. Thx Rony | |
Hello. I thought I was done with this program but It doesn't work like its supposed to. I wrote the program to display the file every time I press one. But it only works the first time. After that it jus keeps sayin cannot open file. Why does it say … | |
I have a question on external variables in a multifile program. Quoting from K&R (first addition, page 72) "By default, external variables are also "global", so that all references to such a variable by the same name (even from functions compiled separately) are references to the same thing." Here's an … | |
I am not an expert C/C++ programmer, and am having a bit of a problem on a school assignment. The assignment is to build a text file based database. The program has to read a schema file containing information about the individual tables (table name, filename, data field name, type, … | |
When I wrote this program with a structures. I said: [code] { struct Contact { char Name[101]; char Middle[101]; char Last[101]; long Area; long Area1; long Area2; long Area3; long Home; long Business; long Cell; long Other; char Email[101]; char Address[101]; int Zip; char City[101]; char State[101]; char Country[101]; char … | |
Hello all, I haven't used c++ for years and now I need it for school. I am running a fortran 77 code and I wanted to know if it is possible to write a program in c++ (That's the only language I know) that generates random numbers with decimals and … | |
what does the printf function do? it looks something like this... printf("kdjfkldjd"); and you can put anything in the quotes, but then i don't know where it shows up. where is the text supposed to show up? can someone help me out? | |
I see Dave Sinkula understands C++ very well.How can one be assisted by Dave Sinkula | |
why does the output file look completely different than the input file... what am i doing wrong here? [CODE]#include <iostream> #include <cstdlib> #include <fstream> using namespace std; int main () { char maze[10, 10]; int x, y; ifstream file; ofstream output; file.open ("maze.txt"); for (y = 0; y < 10; … | |
I'm confused as to why my program is turning out errors when I try to compile the code. Please help. [code] #include<conio.h> #include<stdio.h> #include<iostream.h> #include<string.h> class link_stack { struct node { int id; char name[10]; node *next; }; node *top,*x,*ptr; public: link_stack() { top=x=ptr=NULL; } void push() { x=new node; … | |
Hi, I need to create a stack with a key and for each key one or more instances of a data structure associated. A multi map seems to be best suited for this. However, I don't know how I could extract an element with the maximum key value whithout knowing … | |
hi, how can i do it: int array[20]={3,431,4,123,4,52,52}; using vectors?? | |
guys i am having a simulation project for my final year and this project has to be designed using c or c++. all i need from u guys if u can help me is how to draw an airplane in c++ in 3 diemension .. because i am gonna design … | |
I have a C++ program (Console Application), I want to be able to access it from the Web, My problem: I don't want the program to load every time a user connects to the page (it takes toooo much time), the program should load once and forever on the server … | |
class array problem. -------------------------------------------------------------------------------- I encoutered a problem and can't solve it: in main() hformation *fdatah; fdatah=new hformation(); then sent it to a function: formationinput(vformation *fdatav,hformation *fdatah,ptfilein); in the function, I redefined this class pointer as an class array: fdatah=new hformation[7]; passed compile and link, but each time debug to … | |
Hey guys, I was just wondering if there is a way in C++ to stop a program from crashing if the user enters a char instead of an int by mistake? Thanks in advance. | |
Hi there! please tell me how can i link my source code and header file together in borland c++. i got an answer before that told me to see bcb5.hlp but my borland helo doesn't have it. thanks alot. | |
I'm using borland c++ to program c++. I don't know how can I connect and compile programs with multiple header-files. :o please help me. | |
Greetings To all! To whomever, an advanced thank you if you help me. I am a Java programmer initially, but I have begun learning C++ and am doing something with a Double Linked List (Error occurs whether it's double or single, I teste it). Filling the contents of the list … | |
Hi, I'm trying to write a program that accepts a string (a line, sentence, or phrase) and then the program has to display the contents of that string backward. for example, if I entered "starting out" the program has to convert it to "tuo gnitrats". This is my code. But … | |
I am currently writing a C++ program that uses a external library and engine that is primarily based in C. I am attempting to load an image file and the function requires that the argument be passed as a char *szFileName. I have the file address as a string and … | |
Exactly how do you create multi-file project and how do you compile it in C++ using Linux? | |
I am using Dev-C++ to create a dll file which will link Java-JNI-C-Fortran The project contains CCode.C and JavaCode.h and when I compile, I find the following error: Linker Error>Undefined referece to 'sumsqauredf' The CCode.C file is [code]// CCode with documentation #include <stdio.h> #include "JavaCode.h" // Required header for JNI … | |
Hello, i have problem with Mapi and unicode. I'm workking under win XP, outlook 2000, visual studio c++ 6.0 and extended MAPI. I'm trying get contacts (and information about contacts) from outlook. Everything working when i'm not using Unicode. I get contacts, properties and so on. Problem occurs, when i'm … | |
Hi; i am trying to write complex.cpp and it gives error message can somebody look and write me back what is wrong here is the program[ three parts] and the error message [CODE] #include<iostream> #include<cctype> #include<cstdio> #include"complex.h" using namespace std; void main(void) { CComplex a; CComplex b(5.5,2.2); CComplex c(b); cout<<"a … | |
Hi, I would like to be able to use an api for reading/writing to a file database. Basically, I will have to write programs that have recovery (meaning if it shuts down, etc. it has a file/files to recover from). I could attempt to write something myself but if it … | |
Hello All, I am new to programming and have several books on starting out with C++. I was just curious if there was a publication that has a list of codes and there functions and Syntax. Perhaps with examples of how they are used. Kind of like an Encyclopedia? Thanks, … | |
Hi all and thanks in advance for any help. I have a basic program that needs to read a number of inputs from a user. To all these inputs I assign a default value before I call for the user to give diffrent input. Here is the thing, the input … | |
hi, [B]for( turbo c++)[/B] :eek: is there anyway my program can recognize words :idea: :!: . for eg. cin.getline(sentence,10); :rolleyes: "Hello how are you?" then the program recognises the words - hello, how, are , you and prints "im fine". :) and if i cin >> " hello how are … | |
I am actually having two problems. The first is initializing a char array to a single space for all elements. I have the loop to do this but the assignment to the value: " " is returning a compile error: error: invalid conversion from `const char*' to `char'. Then, when … | |
Hi there. I am using Operating System: Windows XP Project: Visual Studio 2003 C++ MFC Dialog Based Application I subclassed an edit box control because I want to capture the WM_KEYDOWN messages when a user enters characters in the edit box. I need this because I want to measure the … | |
Hello, I am just messin around with this "A Simple Win32 GUI Introduction" snippet I found on this site. I am able to paste it in to a simple project in my Visual C++ application and run it. Basically it is just a blank window. It says you can play … | |
For those of you who are familiar with this app. I am having some difficulty configuring the # statement to call the header file. I edited the .cfg files necessary and added the /bin directory to the windows (xp) environment and still no luck. When attempting to compile a simple … | |
First of all i hope i am posting this in the right place. Anyway, i have recently purchased a copy of sam's teach yourself c++ in 21 days (fourth edition.) and have realy gotten stuck into it with the dream of being able to create some cool programs. i want … | |
I define a class which hold some variables first: [code] class Command{ string cHandle; int numPara; vector<int> cPara; public: Command(); Command(string ucData); //...............more functions here }; //end of class definition [/code] Then I declare an object of Command and wanna store it in a vector [code] vector<Command> cv; Command c; … | |
i.e. . . [code] #include<iostream> void EatFrisky(Cat *Cat); int main() { Cat * Frisky = new Cat; EatFrisky(Frisky); return 0; } void EatFrisky(Cat *Cat) { delete Frisky; std::cout<<"Someone ate Frisky!\n"; } [/code] | |
I have this function in a Dog Class and for some reason, the age nearly always ends up being 77. I can't seem to tell what the problem is. Any ideas? [code] void Dog::setage() { while (1) { int age; std::cout << "Please Enter " << itsname << "'s age: … | |
I must ask user number of students who took test, then create a dynamic array and then get the scores for each student. Then calculate the sum,average of the scores. My problem is that once it calculates it continues to ask user for student scores. I am confused with this … | |
i'v got a very annoying problem. each time i put my Sims cd in my disk drive this message always comes up: [i]Microsoft Visual C++ Runtime library[/i] [i]Runtime error![/i] [i]program c:\Program Files\Maxis\The Sims\Sims.exe[/i] [i]Abnormal program termination[/i] someone please help, iv tried evrything, i havent got a clue what visual C++ … | |
Can anyone help with a program that would allow you to enter 5 floating point values into an array called Marks and then calculate and displays the average of the marks entered? Also need help with a second program that manipulates an array of 7 integers according to the following … | |
in one file I define [code] void Show(char* s){ string str =" "; str+=s; cout<<str<<endl; } [/code] then in main I call it by [code] char s[100]="Testing..."; //or use *s here, make no difference Show(s); [/code] output nothing but blank. weird? |
The End.