51,593 Topics
![]() | |
O.K. Ive compiled my program for debugging. I really don't know where to start looking. My program consists of two blocks of source code (Robotmoves.cpp and Character.cpp) and one header file (Character.h) Once I have compiled and attempted to run the program the error tells me my Robotmoves.EXE had triggered … | |
hi all, I'm new to visual c++ and currently im doing a school project which involves using a smart camera-projector system....I need to use visual C++ 6 in order to connect to system and I just do not know how to do it......this is just the first step of my … | |
Hey, I am in the process of writing a program that stores a integer entry into an array where each element in that array directly corresponds to a date on the calendar for that month. I think I have my code working, or at least almost working. My problem comes … | |
hi may be i ask this question befor but i did not get a good reply. i want a socket library that help me to send and recieve packet and deal with them simply like PacketX library. but the problem here is that the application that i want to write … | |
Why won't the 'luck' function get executed? Pasting the code of my tutorial in my compiler creates the exact same error as the little test code below: 'luck' undeclared. First use this function. I use dev c++ Thx ;) [code] int main() { printf("hellow (printed in main)\n"); luck(); return 0; … | |
Hi, can anyone tell me how to configure DirectX (December 2006) in MS visual C++ 6.0 please, or at least where or what to read to finally do it? I’m having a real hard time figuring this out thanks | |
hi these are some variables: [code] struct TIJDSTIP { int dag; int beginuur; int operatiekamer; }; struct ALLE_PATIENTENDATA { int nummer; char naam[20]; struct TIJDSTIP tijdstip ; int leeftijd; int discipline; }; [/code] first I only fill: nummer, naam, leeftijd and discipline (so the main strucure) using scanf. example: [code] … | |
This program is correct, it repeatedly asks the user to enter a score till you enter a negative or a number over 100. Than it adds all the scores and counts how many scores entered. Now the problem is I have to write a function called "average" that will will … | |
Aright, now all of you might be tired of my sometimes info-lacking posts about binary files. ... but I have another quick question: How do I write and read a double in a binary file? Code as simple as the following does not work (which is the usual code for … | |
Does anyone know how to make a console application open in fullscreen mode...Iv searched google,yahoo,MSDN, and other fourms and there was no specific C++ code for a console app fullscreen mode...Does anyone by anychance have an Idea on how to go about this?? :mrgreen: | |
[CODE] #include <iostream> using namespace std; #include <string> using std::string; using std::getline; int main () { char string1[256]; char string2[256] ; cout << "\nPlease enter the first array string: \n"<<endl; gets (string1); cout << "\nPlease enter the second array string: \n"<<endl; gets (string2); int length1 = strlen( string1 ); int … | |
[code=cplusplus]/*Make a program that allows the user to input either the radius, diameter, or area of the circle. The program should then calculate the other 2 based on the input. (Beginner)*/ #include <iostream> using namespace std; #include <cmath> int main () { double pi = 3.14159265, radius, diameter, area; char … | |
Ok i just started c++ with no knoledge about any other programming language, so bear with me. I am trying to make a simple program that you enter a password and if it is correct, it says welcome. If it is wrong, then it says try again. Simple? Well when … | |
Using the Turbo C++ Project facility, I have linked some 5-6 files which consist of function definitions with a file which contains the definition of main(). main() uses the function definitions that are given in the other files. There are a lot of variables which need to be accessed by … | |
Hi all, we al know the preffered load address of any proj is 0x00400000 and DLL is 0x10000000. now if the OS is unable to use this address it relocates the project. now i have a need to use the Rva+Base address of all the methods available in a class … | |
OK, here is my c++ program that i made with "Visual C++ 2005 Express Edition".... [code=cplusplus] #include<cstdlib> #include<ctime> #include<iostream> using namespace std; int main() { cout << "Welcome To Danny's Game!.\n"; cout << "See if you can beat me.\n"; cout << "The First number below is your number.\n"; srand((unsigned)time(0)); int … | |
[COLOR=#000000]This my first C++ programming class and I'm not that good with C++, so please help me out. This is due in 4 hours. This is what i got and i got a lot of errors. Thank you and once again please help me.[/COLOR] [COLOR=#000000]1.Repeatedly reads a student score (for … | |
Hello ladies and gents, Ive got an exercise in which I have to fully parenthesize expressions using the higher-lower precedence, for instance: a+b*c would become (a+(b*c)) because multiplication has a higher precedence then addition. Here are my solutions for the following expressions: 1) a = b + c * d … | |
[CODE]#include <stdio.h> int main() { double first_def; double secnd_def; int fibcount; int max; double curfib; int N; printf ("Please enter the number of loops (int value)... "); scanf("%d", &max); if(max <= 0) { printf ("Number must be greater than zero... seting to default 20\n"); max = 20; } first_def = … | |
hey i am a 1 st yr college student in my country and im findin c++ programmin 2 b difficult n i found this site n i wud like to know if ne 1 here can help me with these 3 programs? 1. write a program that prompts for and … | |
ok, i really want to learn how to use c++, but i can't find a site to download it from!! so if yall can be kind enough to list some sites that would be awsome!! :lol: | |
Using C++, Allow a user to input a series of zeros' and one's. stored in an array representing a binary word. Then display the word horizontally on one line of the screen. Then the program finds the decimal equilivant on the screen. I would like some pointers on solving this … | |
Hi, I'l be starting my graduation project in a few more weeks, and my group members and I still havent found the right topic. We've all been reasearching and all, but we still need more ideas. One of the ideas that we came up with is a text paraphraser. We … | |
hi every one i am new and i want to ask if therer is any socket library in c that can work using Borland c++ to build network application in standard Dos and has the ability to reach the physical layer. thanks for all | |
Hi! First I'll say that I've searched this forum and read many threads and followed a few recommended links. I still need some clearifacation: I use Borlnad C++ V3.1 which runs in DOS. Can I draw an image in let say "Paint" and then display it with the above compiler … | |
Hi, i am using the visual studio 6.0 C++ compiler but i am using C programming console application. I have just learning C programming for 1 month and would like to learn more. So what is enum or playsound function? can i use them in C programming not C ++ … | |
I have made a txt file out of integers and chars that contains numbers and words. When I read the file and get to a line that contains a number, I would like to put it into back into an integer. How do i do this in c++? thx | |
Hello! here is what I wanna do: I have a while() statement, and inside of it I have some instructions to repeat. My problem is that, I want somehow to stop that loop ONLY when I press a key... I it's kinda like getch() but getch() waits for a keypress.... … | |
I have a homework assignment that deals with creating a command line menu, and then selecting items from that menu that do something. the items need to be selected by using either a lowercase or uppercase letter that represents that specific menu item. for example, if i want to print … | |
G'day all. I have been trying some Allegro applications within my VC8 compiler. Everything has been linking fine until this one: [code] #include <allegro.h> BITMAP *myImage; int main() { allegro_init(); install_keyboard(); set_color_depth(16); set_gfx_mode( GFX_AUTODETECT,1280,600,0,0); myImage = ( "G:\\My Images\\box.bmp", NULL); acquire_screen(); draw_sprite( screen, myImage, 200, 150); release_screen(); readkey(); return 0; … | |
For some reason this code is not accepted by the compiler. [code] template<class T, class A> void ShowMap(const map<T, A>& v) { for (map<T, A> ::const_iterator ci = v.begin();ci != v.end(); ++ci) cout << ci ->first <<": " << ci ->second <<endl; cout << endl; } [/code] The compiler says: … | |
Hello ladies and gents, Gotta few questions if you don't mind: 1) Exc_6_4) Wrote a table of values for the bitwise logical operators and was wondering if any of you could check them out whether they are correct this way. 2) I have to write five examples of undefined behaviour … | |
I just started learning C programming 1 month ago. I am using visual C++ 6.0. currently i am learning the console application. Is there anyway i can add a wav file attach so it can play when it runs? i tried the threads in this forum but it only seem … | |
Hi, just looking for a quick answer to my problem: How can I read a string from a binary file? for example string buff; binfile.read(reinterpret_cast<char*>(&buff), 10) does not work. Doesn't work either if buff is declared as a c-style string. I'd preferably like to read it into an STL string. … | |
I've set the promt window size to full screen. But now I can't return it to 'window', because it hasn't got a blue header anymore where i can acess the properties. Does anybody know how to set the console window back to 'window' when I press F9 (compile and run) … | |
Hello everyone. I am reading C++ Demystified and am on the chapter about the for loop. I am using this code [code] [COLOR=#0000ff]#include[/COLOR][COLOR=#a31515]<iostream>[/COLOR] [COLOR=#0000ff]using [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]int[/COLOR][COLOR=#000000] main()[/COLOR] { [COLOR=#0000ff]int[/COLOR] num, counter, total = 1; cout << [COLOR=#a31515]"Enter a number: "[/COLOR]; cin >> num; cout << [COLOR=#a31515]"The factorial of "[/COLOR] … | |
Hello, im a new C++ programmer. One of my first programs is to turn a normal english word into pig latin. I have one last error to sort out. I keep getting a parse error and i can't figure out why. the error is: In function `int main()': parse error … | |
help,i was doing C++ programming,i'm beginner and when i was coding something,there comes a cursor that blinks and when ever i press enter it delets characters i wrote,how can i stop that,help? | |
looking for a function that will htmlencode a cstring | |
hello sorry to trouble you, i was wondering if you could see this program on this c++ program. i want to have a program were i can enter two intergers to make a cetain grade i.e. 56 +4 >60="c" for example, any please look at my program. [code=cpp] #include <iostream> … | |
Hi everyone, I'm new here and this is my first post. Like the title says - I'm new to the whole coding and programming thing, I really LOVE the thought and the idea, I've started out with XHTML and CSS, it's going easy so far and I think I have … | |
I would like the program to repeat the "how many" question until the input is an integer: [CODE] int X = 0; number_patients: cout << "how many?\n"; if (! (cin >> X)) { X = 0; cout << "please enter a number\n"; cin.clear(); goto number_patients; } [/CODE] This creates an … | |
The following is the core dump got from the application crash(just took a line from the core dumped file). [code] 003af9dc memcpy (0, 0, 4629e8, 4629e8, 0, fbc06e65) + e8 [/code] I could not understand what it is trying to say here. As memcpy takes three parameters, here it is … | |
School project, just wondering if there is anymore documentation that I woould need? [code=cplusplus] //********************************************************/ // Tim Petrich, T.Scot Alexander // Program: Project 1 Mystery.cpp // Date: 17 January 2007 // Purpose: Binary Convert // Description: Converts text into binary using the division method // through ASCII code. // The … | |
![]() | I am getting a runtime error somewhere in the inputData function, I can't find it. Can anyone help? Thanks [code] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iostream> [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<string> [/COLOR][COLOR=#0000ff]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]void[/COLOR][COLOR=#000000] inputData (string &); [/COLOR][COLOR=#008000]//function prototype passing by reference [/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000] outputData (string); [/COLOR][COLOR=#008000]//function prototype passing by value [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] main()[/COLOR] { string myString; [COLOR=#008000]//instantiates … |
I have this problem... Ive gotten the codes however, i cant seems to get the output correctly.. This is my program: [code=cplusplus] int n; cin>>n; //reading in value of n if (n==1) { cout<<n; //if n=1, print out 1 } else if (n%2) { n = 3*n + 1; //if … | |
[COLOR=#0000ff]switch[/COLOR][COLOR=#000000](time)[/COLOR] { [COLOR=#0000ff]case[/COLOR] 1: System.Console.WriteLine(" Enter the century. ie 20 or 19."); C = System.Console.ReadLine(); Convert.ToInt32(C); [COLOR=#0000ff]goto[/COLOR] [COLOR=#0000ff]case[/COLOR] 2; [COLOR=#0000ff]case[/COLOR] 2: System.Console.WriteLine("Enter year in YY format. ie 96") ; Y = System.Console.ReadLine(); Convert.ToInt32(Y); [COLOR=#0000ff]goto[/COLOR] [COLOR=#0000ff]case[/COLOR] 3; [COLOR=#0000ff]case[/COLOR] 3: System.Console.WriteLine("Enter month in MM format. ie 03"); M = System.Console.ReadLine(); Convert.ToInt32(M); [COLOR=#0000ff]goto[/COLOR] … | |
Hi! I've been learning C in a course for almost a year now (twice a week 3 hours a night). I'm about to be tested soon and I shouldn't have trouble passing the test for C. The questions are all about "find the largets value in a vector" or "what … | |
Hi, i'm new to this website. I have recently came across a qns given by a friend and i'm thinking how to do it. Hope u all can help me... Here is the qns: The circuit below shows a decoder circuit using 3-to-8 Decoder and 2-to-4 Decoder with logic gates. … | |
Hi, I'm having difficulty in converting an ansiString to a string, i've searched loads on this but could only find how to convert a string to an ansistring. I'm tring to open a filestream for reading using the filename selected by the value of an open file dialog. Code below … |
The End.