49,761 Topics
| |
PLEASE HELP.... I was wondering if someone could help me. I am taking a programming class and I am having alot of problems. When I began my class we were given a copy of Visual Studio 2003. I had alot of problems with it and when I would go to … | |
Hi, On building a windows service, i m getting the 57 errors and 11 warnings. All the errors are about structure redefinition. Given below are some of them. :\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winsock2.h(112) : error C2011: 'fd_set' : 'struct' type redefinition C:\Program Files\Microsoft Platform SDK for … | |
For a program I'm writing I only need two digits past the decimal.I was a c programmer and the way I would have done this was [code] printf("%2f",variable); [/code] Is there anything like this in cout? | |
i need to know how to use powers in c++. so if i enter to and then 3 for the power i get 8. this is what i have so far [code]#include <iostream> using namespace std; double power(double,int); int main() { double n; int p; cout << "Enter a number … | |
I am struggling with how to make an Item selected from a ComboBox change the color of a square on the form. If I enter code in the OnClick event of the ComboBox, then as soon as I click the box the square changes color. But there are also Circle, … | |
hello everybody, I am a beginner in C++. I got a CD with a C++ how to program,fifth edition book by Deitel which has the source codes included in the books. The source code for ATM case study is in parts i.e. user defined header files r dere which includes … | |
Hello there, I'm creating a cd writer application. As of now, I was able to create a data burning application for cd-r/rw. I'm having trouble finding the code block for writing audio cd. I'm using cdrom.h and the command for writing data is CGC_DATA_WRITE together with GPCMD_WRITE_10, I looked for … | |
If you can help me? I have some problems.I have to put the five marks in five subjects for a student.The student must have ID,Name ,Surname,Subject and Mark. This we have to write in a file.Then we have to write in Screen the results(toread from file).After that I have to … | |
Hi, Can someone expain why ompiler provide default Copy Constructor for every class. As i know there is only one reason that if Compiler does not provide the copy constructor, f we pass the object by value or we create a new object from existing object or we return object … | |
you know... i could never figure out how to use forks in c++... my teachers can't explain it (yeah... i know... they must be great teachers, right?), i can't find a chewable explanation of how to use them... so... since, i guess students are better teachers than teachers themselves, specially … | |
I am a beginner at C++, (thought not really to programming in general)........................... and decided to challenge myself to write something: A descrambler........... I know what I need to do. I need to: [code] (any code is pseudocode) open scrambled words file open the wordlist :loop get scrambled words get … | |
In this question you have to write a program consisting of two functions. A string has to be input in the main function and then a string function, namely shorterString, has to be called to shorten the string by deleting (“erasing”) every third character of the string. This has to … | |
i want to clear a string after the prog. has done it`s work. i tried it by using a for loop and assigning a blank, but it didn`t work. the problem is that if i run the program again then the earlier value is displayed again . i`m using Turbo … | |
[code] #include <iostream> using std :: cin; using std :: cout; using std :: endl; #include <iomanip> using std :: setw; const int rows = 3; const int column = 3; void PrintTicTacToe( char [][3] ); //The function prototpyes for this program void p1( char [][3]); void p2( char [][3]); … | |
Hi, I'm writing a C++ program with Qt4 libs. When I do a particular sequence of operations, my program exits (but does not crash) with this error in the console: [CODE]my_program: symbol lookup error: libqtxml_plugin.so: undefined symbol: _ZN15QXmlInputSourceC1EP9QIODevice [/CODE] The function is inside a plugin I've written to parse XML … | |
i know i learned it somewhere, but its been a while since i used it... how do you make an user given array size... i mean...[code]int b; cout<<"Input the array size: "; cin>>b; int array[b];[/code] i know this is not hte way of doing it... but just so you get … | |
I'm running my program in linux v. 2.6.20 and gcc v. 4.1.2...i got a problem here...when i compile my source code .cpp using gcc there's no error... but when i compile using g++ there's an error "undefined reference". sample: File.cpp: (.text+0xc50): Undefined reference to 'ClassB::Close' what's the problem with this? … | |
[code=c]//Writee a program that inputs a3 digit number finds the sumof these digits #include <iostream.h> #include <conio.h> #include <math.h> int main() { int num,num1,num2,num3,num4,s=0; cout<<"Enter the Number: "; cin>>num; num1=num%10; num2=num/10; num3=num2%10; num4=num2/10; s=num1+num3+num4; cout<<"The sum of digits= "; cout<<s; getch(); return0 }[/code] This program I wrote but shows error … | |
I added a line to this program to read the length of the the string , then display the test. strlen() is not cooperating! Am I using the wrong function? the compiler says the arg should be char*. I'm confused! [code] #include <iostream> #include <string> #include <vector> using namespace std; … | |
what is the different about C++ n C.. i have a program below which my friends say that it is on C.. how do i change to C++.. [code] #include <stdio.h> #include <stdlib.h> char matrix[3][3]; /* the tic tac toe matrix */ char check(void); void init_matrix(void); void get_player_move(void); void get_computer_move(void); … | |
ok i need some help on programming a "delete" button that needs to do the following: it needs to access a server "\\server" and then a sub share on that folder so: "\\server\subshare" then it needs to delete everything in the subshare folder completely. does anyone have any suggestions? | |
Please take some time to read my questions. Thank you. My current C++ exercise project is a win32-console text-only MUD engine. (MUD = "Multi-User-Dungeon" referring to the game genre in which the player wanders around in a 'map' of 'rooms' and can interact with many 'items' and 'characters'. In the … | |
I am trying to write this loop in a simple convert process, but I get all sorts of crazy errors when I try using the "not equals" operators. here is my code: int main() { int i = 5; std::string s; do { cout<<" Enter a string: "; cin>>s; cout<<endl; … | |
I was experimenting with a direct method of dereferencing an iterator. It works OK with numbers, cout gets confused (??) when the derefenced pointer is a string? The code was supposed to stuff a vector, then read it out . I hacked up that original to do some troubleshooting and … | |
Can somebody help me understand what does this function do? And also if there are any logical or syntactic errors in the function. I was told that there are 2 bugs in the code. I can only think of 1 which is below: 1. In the first while loop in … | |
What is a two-dimensional char array with 3 rows and 3 columns. Can give me an example of a program. Thanks | |
Hi to all , I wished if any one of you could throw light on [B]mechanism of insertion sorting in C++[/B]. I know what is bubble sorting but I had confusion regarding what is insertion sorting? In school my professor had mentioned about it, but I do not have any … | |
Please Help, I have our first assignment here on functions. It is pretty difficult, at least the one part that I keep getting stuck on. I seemed to manuver through the other parts I was having trouble with so far. But to start our assignment is to write a program … | |
can anyone give me more info on the system command? It allows you to execute dot exe programs from your code. I am in particular looking for return values. Can one get the system function to let the called program write its output to a variable instead of writting it … | |
a)i got stuck with a qustion which asks for a date input in this format: DD-MM-YYYY. I used a string to get the date input because the "-" are required, but then i'm not sure how to check that the user only enters dates. b)another problem i encountered is that … |
The End.