64,152 Solved Topics
Remove Filter ![]() | |
Hello, i have to write a program using C++ that will store 3 characters into 3 variables, and using pointers i have to rearrange the order in a function. so if c1, c2, c3 have the value 2,4,6....using pointers i have to switch the values of c1, c2, and c3 … | |
I am trying to teach myself C# and I have run into a problem with one of the chapter assignments. The problem is as follows: Create a class named City. Objects will be instantiated from this class. Include fields that hold the City's name, its state, and its population. Include … | |
Hello ladies and gents, I'm trying to write this little program in wich I have to enter by keyboard a certain amount of numbers (int) not floating points, and the program must count how many [U]different [/U] numbers I have entered, when the amount is equal to ten, it must … | |
i have dev 4.9.9.1...i will create a win 32 console application.. write some code omething basic like... //REMAIN.CPP #include <iostream.h> //necessary for cin and cout commands int main() { int dividend, divisor; //get the dividend and divisor from the user cout << "enter the dividend "; cin >> dividend; cout … | |
![]() | ![]() |
Hello All, I'm very new to C++ and programming in general and am having probelms with an assignment i have been set. I've been using ?Blood dev C++? ( i dont know if this is any good?) I have basically finished the program and am getting one syntax error that … | |
**I use Microsoft Visual Studio .NET 2003's compiler I having trouble trying to create a 10x10 2D array. The user is supposed to give me a starting number and then it fills the array from top to bottom with ascending numbers. I am terrible at arrays and this task doesn't … | |
this prog. is supposed to demonstrate a strcpy error...however im getting an error and it wont run....once again im suing a dev c++ bloodshed compiler. and heres my code....once again i know it has a strcpy error thats the reason for writting the program..to demonstrate a char array overflow. strerror.cpp … | |
i need some direction for a decent free c#/c++compiler...please advise. | |
I have this simple calculator I just started on, and I'm having just a few problems. First of all, I don't know how to append text to a textfield. Maybe I would have to create a string buffere or something. Then, when the user clicks one of the buttons, the … | |
Hi i'm new to c++. I can sort of make simple programs, but everytime i try to making a program with a GUI the black windows box keeps coming up and sitting in the background. Does anyone know how to get rid of it? I've found some snippets on other … | |
i want to delete part of a binary file, let's say 12 byte record somewhere in the middle of the file. i can think of only one thing: - put the file pointer on the spot - shuffle all the following records up there're gotta be a better way ... … | |
Hi everyone, I just came home from a software conference in nagoya, Japan where they had any kind of software you can think of on this planet. There was one talk i went for and i think its quite interesting to have it discussed fully here. Alot of the companies … | |
Hi everyone! I was wondering if anybody knew how to compare to strings in C#. I know in java you use CompareTo, but how and what do you use in C#? Thanks, C++ :mrgreen: | |
Hi, i am using pow command quite frequently in my codes, and i have a feeling that i may be using it incorrectly. foe ex: [CODE]pow(image[x][y],2);[/CODE] image[x][y] is unsigned char and 2 is numeric, so is the arguments ok. [CODE]std_dev=pow(((ur_mean/(R*C))-(im_mean*im_mean)),.5);[/CODE] this a bit complicated, will it work this way? is … | |
Have a look at the following code. It is the only thing in the file...the following variables are defined outside the php file: [list] [*]$required [*]$first_name [/list] [CODE]require_once("config.php"); if ($required) { $require = explode(",",$required); for($n=0; $n<count($require); $n++); { $field = $require[$n]; print $first_name; print $_POST[$first_name]; } }[/CODE] When post data … | |
hey everyone am trying to generate a beeping sound on my pc using the 'sound' function , the problem is i am getting errors (5 to be exact ) when i compile this program , please someone point out the error on this code , thanx :) below is the … | |
Hey guys, I need some help with looping. I am writing a currency converter (who in begining programming isn't these days) and I want to have it loop so that I can it keep asking for another entry or make it quit. Here is what I have so far: [code] … | |
Hi i am learning C++ i typed the following programm it is asking me to enter the age , when i enter age and hit eneter button it is generating the following message test2.exe has generated errore and will be closed by windows you will need to resterat the programm … | |
Hello 2 questions..... 1) I just tried to code a switch statement with a stribg but my compiler throws up error messages.... 2) Is they anyway I can convert a string to an int and then back to a string? cheers | |
Ok, i know my program is probably all done incorrectly and thier are probably eaiser ways but, it works for me so.. I have an error and i cant find out what it is. Can anyone tell me? [CODE]//Game Project 1 #include <iostream.h> #include <conio.h> #include <iomanip.h> #include <stdlib.h> main() … | |
Does anyone know what's wrong with this function? The program that uses it runs but does not display the average. I also tried using the sum variable instead of ptr3 and had the same results. [CODE]void calculate(int days) { float sum = 0; float average; temperature_node *ptr2; temperature_node *ptr3; ptr2 … | |
Hi i am trying to start doing C++ programming when i write a simple hello programm it is compiling correctly and the out put window is not staying on the screen , i am unable to see it it is suddenly disappearing can any one help me | |
Hi, just wanna ask if c++ opendir,readdir and closedir code can be implemented in visual c++, i have resently started using this complier and dunno what libraries have changed and if some of these sentences are still valid, and if u can recommend me some kind of "migrating c++ to … | |
I have this code that is suppose to append text to a JTextPane, using the Document method insertString(). I can't seem to get the attribute argument right, so maybe one of you can point me in the right direction... Here is the one line of code giving me problems, just … | |
Hello, I am using dev-c++ on a windows computer. I download a gui package off of the bloodshed dev site. I installed and everything seem to work. I was making a simple gui off of this tutorial I found online that used the library. The library is wxWindows. Here is … | |
How to show a list of options and allow the user to select the options by using arrow keys and enter. | |
I have a question. Still trying to understand. I am using borland c++ vr 4.5. I am working on a project that usees the sleep function 4.5 does not support this function. Is there somewhere i can find a win16 version that would work in this program. tnx ron hathcock | |
How can I login remotely and force a command/script to run in a particular X Server when are multiple X Servers running? Here's what I want to do: Force my desktop to be displayed on multiple remote machines, each of which has multiple X Servers running simultaneously. That is, force … | |
Hello ladies and gents, I'm trying to reverse a string when one is entered with cin.getline, so when typing for example: testing My output should become: gnitset Ive written this piece of code and it works but, because the string has a certain length and not the whole length of … | |
Hello to everyone! I was thinking about posting a few tutorials about but have only found vb.net and c++ tutorial forums! I was thinking also of posting a few HTML tutorials up and perhaps other general software design topics but cannot find a place to appropriatly post them. any suggestions? … | |
![]() | I'd like to ask if anyone knows how to randomize character variables, and if it is possible to define the possible characters it can use in the randomizing process. Any info would be excellent ^^ T#4NK$. ![]() |
Dus anyone kno a good 32 bit c++ compiler [B]for free on the internet[/B] | |
Hello ladies and gents, Ive written a program wich I'm almost certain it'll work, Ive only got one problem, I need to write an if like this: int a = 0; if ( u!=x) a++; Now, u is a floating variable wich is divided before this selection by 2, 3, … | |
I am writing a program using a linked list and I am almost to the point where I can compile and run it but I keep on getting this error message: error C2447: missing function header (old-style formal list?). What does it mean? I looked through the code but I … | |
Hello people I'm new to this forum and only been suing c++ / c for a little while now. I'm trying to seek out help with a program. I've written some of the code: .................................................................................................... #include <iostream> #include <iomanip> #include <ctime> #include <cstdlib> using std::cin; using std::cout; using std::endl; using … | |
Hai! I tried writing a stack program using the concept of templates. It worked well for the int,char and double.But when i tried to pass a complex class error occured. Is it possibleto pass a class to the template class? If so what is the syntax for doing it? I … | |
I've been having some fun with early programming and have created several projects with various attempts at some failed programs. I wanted to redo, with new file names, some of these with new attempts. However when I try to delete the bad files in a project, the project stills lists … | |
I am writing a program that uses a singly linked list. The program is suposed to ask the user for the number of days they have temperatures for and for the corresponding temperature. I seem to be having a problem with the get_temp function. When I run the program it … | |
i am in the midst of studying for finals and i came across a program about the olympics. in this program we were given the id's of each judge and the scores to put in. once we have all the scores you are asked to average them. although my program … | |
I am used to using: [CODE]char *str;[/CODE] to make a string but recently have changed to using the ANSI string class as its a lot more powerful and easier to use... BUT i have a problem! when I have encountered a string which conatins a " character I have used … | |
Hi al...I am a total c++ beginner...I need ur help plz...I am making a program which asks the user to input a binary number and displayz the binary number converted to decimal number using a function. The code which i wrote is below: #include<iostream.h> #include<math.h> int bin2dec(int n) { int … | |
I have asked this question before and have not gotten a completely useful answer. I am trying to sort a number of any size. For example: if 643597 is entered, the output should be 345679. | |
I am having a little trouble incorporating a simple password into a voting machine style program. If anybody can see what's wrong with it and point it out, I would be very grateful. [CODE]#include <iostream> #include <iomanip> #include<string> #include<cstdlib> using namespace std; int main() { char choice; string password = … | |
:cry: I am very confused, i am working on a console application and it doesn't seem that my console output codes are working. Can someone tell me whats wrong? cout << "text" << end1; | |
Sir, I need ur help in the Following Assignement. I have to write a program to store the Employee details i.e rollno,Department,salary,name,experience etc using the file operation. plz help me! Urs PriyaJaiGanesh | |
The System () function call is in C and C++, but I can't seem to find out just exactly what it can do. I use "C++ How to Program", by Deitel and Deitel, but it's silent on the application of System(). Any help would be appreciated. Thanks. PS: For example, … | |
i am taking a cpsc 140 class and i'm a little confused how to begin my assignment. Write a C++ program that reads in an unknown number of characters from the a text file, count the number of words, and print each word in reverse to the screen. Words are … | |
i've been reading a lot of the posts here to help me learn C. the problem is, much of the code is written for other compilers (i use gcc). i didn't know there was compiler-specific code until i tried to compile code from questions asked here. this seems so backwards, … | |
I am working on a program that asks for 2 number between 1 and 100. Its supposed to say how much even numbers are in between these two numbers. Then I need it to list out all the even numbers between those numbers... So far I got it to calculate … |
The End.