51,593 Topics
![]() | |
My prof. gave us this class project to do and we had to more or less fill in the blanks. So here is what i have for my code and it works up to the point where it asks you if you want to go first or not. So weather … | |
Ive been writing a DirectX application for some time and there has been a bug that I have been unable to fix, but this is to do wth the Windowsx API. I can run my DirectX application (Fullscreen) fine, but when I Minimise it then restore, fullscreen mode does not … | |
Yes, this is homework. This is my first course in programming and I am having a problem translating what I know I need to do into code. I basically need to write a progam that reads a person's name in the following format: first name, then middle name or initial, … | |
i am having two problems with my code. the first error message highlighted in green says i need to return a value instead of what i have written down. and the line highlighted in red says that my value is not being ignored. can anyone help? I am totally lost. … | |
[CODE]#include <iostream> using namespace std; int main() { int a; cout<<"Enter a number"; cin>>a; [B]if(a=5)[/B] { cout<<"Five"; } else { cout<<"Not Five"; } } [/CODE] When I use the assignment, the result is always "five". I understand that a is assiged 5, but there is no statement to check for … | |
Hi i am a beginner in programming C++ language and am having a bug in the doubly linked list program. The problem is while printing the list in fwd direction the prgm prints the contents just fine. however while trying to print the list in reverse direction nothing gets printed. … | |
Hello! I have written a program that lets the user enter numbers and they are then sorted into ascending order. The number of times each number occurs is also displayed. I previously wrote it using a selection sort but could not get the times each number occured to display correctly. … | |
I am trying to print to my printer which is on LPT1 from a C program Am using dev c++ which came with Teach Yourself C in 21 Days here is the code that is supost to print th my printer which is a HP Photosmart 7350. [code=c] /* Demonstrates … | |
hello everyone I am trying to create an array that will prompt the user for 5 numbers in the array and simply display them. but I keep geting this error message saying i have too many arguments in my function... please help. here is my code: [code=c] #include <iostream> using … | |
Can anyone explain why I am not getting any output from this code [code] int _tmain() { String *sym[] = {S"BA", S"CA", S"MS"}; int shares __gc[] = {25, 100, 30}, price __gc[] = {25, 31, 37}; Random *randomCurVal = new Random(); int purVal, curVal; int totalPurVal = 0, totalCurVal = … | |
I have a program that creates a linked list and is required to count the number of elements in the list. This is what I have thus far. [code=c] #include <iostream> using namespace std; struct listrec { int value; struct listrec *next; }; listrec e1,e2,e3; int listsize(listrec); struct listrec* temp; … | |
hi everyon i'm new and i need some help. I've been taking a class in C++ and i downloaded the C++ 2005 express edition to my laptop to work on it at home, and the header file iomanip.h doesn't work. I bet this is probally an easy fix but help … | |
dear people! i have made a program to calculate the smallest and largest of numbers trough a reference funtion. i am stuck in a very small part. in main function i should do like if somebody dont enter anynumber or enter a number bellow 0 the program should say NOTHING … | |
My program is reading from a file that has the following lines (plus quite a few more....) the name of the txt file is palindromes.txt. [code] Able was I ere I saw elba Go hang a salami I'm a lasagna hog Dennis and Edna sinned Satan oscillate my metallic sonatas … | |
I have a general question about compilers, I just want to know the opinions of people that have been using them for a while. I want to know what is your favorite one (the name and version) and why you like it the best. | |
I am writing a program that allows the user to insert numbers and then the program sorts them into ascending order. I have this accomplished, however, I also need an array to count the number of times each number the user inserts occurs. For ex: Say the user inserts 3 … | |
Hi I am new to C++ and I would be grateful for some help with the following: [code] #pragma argsused int main(int argc, char **argv) { AnsiString Line; int Index; Line = ReadStringPr("Enter your text. It must not finish with a space character." ); Index = 1; while (Index <= … | |
I have this code (example) [CODE] const char g_sz_className[] = "myWindowClass"; LRESULT CALLBACK WndProc(HWND hwnd, UNIT msg,WPARAM wParam, LPARAM lPraram) { switch(msg) { case WM_CLOSE: DestroyWindow(hwnd); break; case WM_DESTROY: PostQuitMessage; break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } int WINAPI WinMain(HISTANCE hIstance, HISTANCE hPrevIstance, LPSTR lpCmdLine, int … | |
please i need someone to help write a program that receives some sets of binary numbers and convert to decimal..... using C++ | |
Hello *, I was writing an assert() stmt when I realized the following (see code). Can anyone explain why/how. My final aim is to be able to write an assert stmt for verifying that my function (a demo function) works fine. I heard from someone that there are special assert-macros/comparision-operators … | |
#include<iostream> #include<fstream> using namespace std; void main(){ ifstream inf("data.txt"); char name[30]; while(!inf.getline(name, 30, '|').eof()) { char jersey_number[10]; char best_time[10]; char sport[40]; char high_school[40]; inf.getline(jersey_number, 10, '|');// #read thru pipe inf.getline(best_time, 10); // #read thru newline inf.getline(sport, 40, '|'); // #read thru pipe inf.getline(high_school, 40); // #read thru newline cout<<"jersey number: … ![]() | |
hey guys, i'm using Borland 6 c++ in windows xp, now that we got that i have a problem with my program, i have recently created a password function in a programm that works so that when they try to type in their password it shows the * instead of … | |
How to use Data base connectivity in c++, files are not very useful.. | |
Hello, I have just installed Microsoft Visual Studio 2005 and it has the folowing to select, under C++ projects selection: ATL; CLR, MFC and Win32. Now Id like to know what are ATL, CLR and MFC and what is each of them used for, Anyway does anyone know when will … | |
I'm trying to find the min/max of the number of years played and the min/max batting average of a list of players in an input file inputted in by the user that looks like this, the file is read and checked and then the program goes and gets the name, … | |
23Zone Hey, I'm new here and new to C++ and I've been learning it pretty quickly. Today my teacher gave the class a problem to do involving loops. It was, for me, pretty simple because we had just went over it. I completed the problem, well that is what I … | |
somebody help me pls... my task is to search a value that matches to my csv file. my csv file contents is like this: 0,"100","WA" 101,"201","BC" 202,"302","EC" this should be the scenario. enter value: 205 output: BC pls include the codes.. i am just a beginner.. thanks in advance.. | |
Hey all, I'm new to this forum, first post.. so please excuse me (also excuse the perhaps not so eloquent style, it is still in preliminary!) =). I'm writing a short piece of code in compliance with a webserver I've been programming with a group. This code is to auto … | |
I cannot figure out how to "call" the functions into the main. Please help!! [code] // ****************************************************************** // // Grades.cpp // // This program computes student grades. For each student, two // quiz grades (graded on a 10 point basis), one midterm exam grade // and one final exam grade … | |
hi, i want to make a program simular to this:: [url]http://www.daniweb.com/code/snippet356.html[/url] but i want it to use Strings not char arrays.... PS::In other words i want to binary write a class-struct which contains a string member.....I think the fact that string is of arbitrary size, creates problem... | |
Hi all...my first post here...WOOHOO!! Ok...now to the meat of the question... I'm a student at the the local JC in an intermediate C++ class...I'm having trouble understanding pointers...I just can't seem to get the full concept through my head...Can someone tell me how they finally "got it"? I understand … | |
Just registered but you guys have been a big help for the whole semester. I have what seems to be a simple problem but I'm just stuck. My assignment is a game of life sim that prompts the user for an input file, and then reads integers from the file … | |
Hey what dod i need to do inorder to get my program to print out 2 decimal places after gross amount and amount donated? you will see what i mean when u run my program. for example i need it to print out $100.00 not just $100. [CODE]#include "stdafx.h" #include … | |
| |
I had posted a while ago about how to put a picture in a game to make it look a little more real. my friend said i should a gui. Does anyone know of a site or how to do this using microsoft visual c++? | |
Illustrates the close relationship of the hard-software industry to April first: [CODE=c]#include <nonsense.h> #include <lies.h> #include <spyware.h> /* Microsoft Network Connectivity library */ #include <process.h> /* For the court of law */ #define say(x) lie(x) #define computeruser ALL_WANT_TO_BUY_OUR_BUGWARE #define soon next_year #define the_product_is_ready_to_ship another_beta_version void main() { if (latest_window_version>one_month_old) { … | |
I am very confused with ADT. I get the concept of why to use ADT, but I dont know how to implement it. The problem I have to solve is to merge 2 sorted list using ADT functions provided. The ADT functions are the functions in my header file. Here … | |
need help in image quantizing using borland c++.. i do not have much knowledge about it.. got to change a 24bit image to a 8 bit image...do not have any idea on how to do it.. pls help... and the deadline is in 24hrs time.. thanks | |
I am writing a program to batch rename files. I am trying to take the file name (which include folders) and remove everything before the last slash. The problem is that LastIndexOf("\\") always returns -1, even if the string contains a "\". And the Remove(0, index) doesn't ever remove any … | |
Hi, I am writing a little program in C++ that is used to read a file which contains several paragraphs. The paragraphs are not indented and there are a blank line or sometimes two blank lines before the start of each paragraph. I have written the program and can read … | |
:?: Q) who translates the code into machine language in c++. compiler or operating system | |
hi i am trying the following code to print the message. it is working well in a system having a printer connected through com1. But is not working in other system that using usb port. what should i do. ofstream outfile; outfile.opne("PRN"); outfile<<"\nThis is test printing"; outfile<<'\x0C'; ![]() | |
:p hi ,this is my first visit to theis web , i hope to help me, i need afull c++ programm of game called "pebble chess" , this game can execute on algorthims called "minmax", and iwill describe this game: 1- each player turn consists of moving one or more … | |
who will convert the code in to machine language in c++ 1)compiler 2) operating system:?: | |
Hi friends, I am back. I was doing some hands-on with the C++ and I think I am a bit confident now :) I came across an Exercise question in a C++ book which is as follows: There is a structure with the variables payment_amount, method_of_payment and risk or priority. … | |
Hi fellow c++ programmers, I need some help with an assignment from my c++ class. The assignment is to use a input file with the following 1 4/12/2007 34 -- 1 is the reference number, date , and temperature to be converted to farenheit. Now i have to output it … | |
Can anyone tell me why I'm getting build errors on the actual function heading and the line under it (**) saying "type bool is unexpected" and that I'm missing a ; before {? I've looked and can't find anything. Also, I get this error but there is no line 80 … | |
In borland there is a function gotoxy to position output to the screen is there a command in visual c++ 6.0 that does this. | |
am using tc3 i want to search files in a folder named "project" on c drive this folder contains some text files namely 2-2AA 2-2BA 2-2CA 2-2DA LOG i want to search how many files are there excluding LOG so that i can open them one by one and manipulate … | |
I´ve been programming a B tree structure in C and i had problems because I programmed it in Debian Sarge and when I wanted to compile the source code in other distribution of Linux the program did not work correctly... The IDE i used is Anjuta... Anybody has idea why … |
The End.