49,761 Topics
| |
Hi, im new to c++ and wondered if anyone could help me with this Use a for loop to display 3 times table backwards 12 times 3 = 36 11 times 3 = 33 10 times 3 = 30 9 times 3 = 27 8 times 3 = 24 7 … | |
Hi there, This is my first time posting here so I would first like to apologize for any mistake I may make. The reason I'm here is because I am designing an assignment in which I draw a .bmp to the screen and the image is supposed to float inside … | |
I'm learning wxWidgets and would like to know which event, connect or using static event tables? Why will you choose one from the other | |
Whenever I try to run a compiled group of code that should bring up a console, the console just flases onto the screen and is gone...I've copied a few programs from this forum onto it to check and see if its just me but it does it every time. | |
having problems with the editing of a function, it works to a point, but for some reason when you enter a number ( that should be correct) it comes with invaid option then on pressing return, it then outputs the fields, but all jumbled up. can any1 help me with … | |
Can anyone please help me reverse the output. This is just a very simple code and the output needs to be reversed in order for it to be correct. [CODE=C++]#include <iostream> #include "stdafx.h" using std::cout; using std::endl; int _tmain(int argc, _TCHAR* argv[]) { int num = 0; int bin = … | |
Hi, I have this "number game" which i just learned tonight ..It runs..but ,not without this warning box poping up, which says: "uninitialized local variable 'guess' used"...This confusing me because i know i did everything exactly like i was taught ...can you find/fix my problem abd explain please it'll be … | |
| EDIT: I mucked up the thread title. It should be "Convert Custom type 'String' to std::string" Hi, How would I be able to convert a custom type 'String' to a std::string? Just that the function I'm using requires a std::string. troublesome code: [code] SetVar::operator char* () { if (szName == … |
I have recently upgraded from Allegro 4.2 to Allegro 5 and am trying to upgrade some of my programs. I came to a program that tells the user a ton of info about the computer it's running on such as the operating system. In Al 4.2 I could just use … | |
the question reads as follows.... show how u can efficiently multiply an integer that is read from the keyboard by 100, without using the operator *. use the << operator several times.... ok i can do this using overload.... or thats the only way i can think of... or is … | |
heey guys.. i just learned the arrays.. am not really good at them.. can some one simplify it for me.. i gat this question.. i tried to solve it.. but didn't get the desired output :S how ever it says 1 succeeded ! here's the Q: 1. Declare one array … | |
[QUOTE=Richy321;880968]Thanks for looking btw.[/QUOTE] Hi I also try to connect sql with c++. Please if you connect than tell me how you connect it. And explain these two lines,I found only two errors of these lines. 4.import "C:\Program Files\Common Files\System\ADO\msado15.dll" \ 5.no_namespace rename("EOF", "EndOfFile") Thanks in advance. | |
Can anyone help me write the program to find the magic numbers in c/c++??I have looking for this solution for a long time so ill be grateful if sumone here can solve it.. | |
Hey could someone please point me to a website which shows you how to remove duplicates of a list container of a class that have the same name, but change the int to be an average of both values in the class? [CODE] class product{ string name; float rating; } … | |
Hi, Im trying to connect to my sql database and generally play around but I get the following error: [ICODE]error C3867: '_com_error::Description': function call missing argument list; use '&_com_error::Description' to create a pointer to member[/ICODE] I think it has something to do the import of the msado15.dll. Obviously if I … | |
<links snipped> Hello I need some help with this question. I have attempted to write a segment of code for the Binary Search Trees in C++ code. Refer to the question below. Design and implement a program in C++ to solve the following problem. DESCRIPTION This program, which learns by … | |
hello friends, as a semester project i have to make a voice chat application. But i am confused how to proceed.Can somebody provide me some help and guide me regarding capturing sound from microphone , after capturing which compressiong methods to use , then which tcp/udp to send packets ? … | |
It's unfortunate to spend so many hours on a loop, but that I have. Below is a function which takes a NULL terminated string pointer and skips over new lines and /* comments /*. It should exit as long as the specific delimiter or comment is not present at the … | |
user puts in the number of employees but inputs less employees. He terminates the loop by pressing the ENTER key. How do i do that. I tried strlen,, and even trid atoi but i dont know how to terminated it. Also when it terminated its just uses that many employees … | |
Okay, I have been googling and looking on MSDN for this for a couple hours or so, and I will continue to do so until somebody replies. I need some help on a program I am making in my free time. Can sombody tell me what would be a good … | |
Hi, can anyone tell me why i can't clean up the memory, and maybe a small solution. I'm allocing memory with strdup for each key, but I cant figure out how to erase the key with free. Before anyone starts talking about mixing c++ and c, I know it's generally … | |
I've got following code section: [code=cplusplus] #include "stdafx.h" int main() { string str; cout << "Enter file name: "; getline (cin,str,cin.widen('\n')); char* file_name=new (nothrow) char[str.length()]; if(file_name==0) { cout << "Error: Memory could not be allocated!\n"; } else { strcpy(file_name,str.c_str()); WriteFile(file_name); ReadFile(file_name); [COLOR="Red"]delete[] file_name;[/COLOR] } getch(); return 0; } [/code] When … | |
Im a beginner to c++ after looking over this code you will be able to tell the outfile code seems to work fine no errors but any feedback will be nice the infile code is the one i have problems with [CODE] #include<iostream> #include<string> #include<fstream> using namespace std; int main() … | |
I am working on a basic linked list program and i seem to be having problems with the getline() function. I try to input data in to my struct: [CODE] cout<<"\n\nPlease enter the name of the student: "; getline(cin, temp->name); cout<<"Please enter "<<temp->name<<"'s class: "; cin>>temp->grade cout<<"Please enter "<<temp->name<<"'s GPA: … | |
/*hi I'm having problems with my "while ()" apperently it is not taking any action, and it keeps going endless. i need it to stop when the answer is 'n'*/ [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<iostream.h> //--------------------------------------------------------------------------- void main() { char pais[20],r; int i=1,temp=0,ctemp=0,atemp=0,dia=0; float promt; clrscr(); fflush(stdin); cout << … | |
Hello.. i'm working on my project.. it's the first time i do a C++ project.. but i'm getting this fatal error.. if any one knows how to solve it plz tell me.. also if anyone have any idea or advice to improve the program plz go ahead. [CODE] #include <iostream> … | |
i'm a beginner in c++ i want to programming sudoku i start with a 9x9 table but i had difficulties to continue 1)how to make a function to check numb in the row,colones,and 3x3 2)a counter to know when the game end or repeat until there is no values [code=cplusplus] … | |
[CODE=c++]typedef vector<string> pipeline; typedef vector<pipeline> subPipelineStrings; subPipelineStrings* m_subPipelineStrings m_subPipelineStrings = new subPipelineStrings(3); string *s1 = new string("s1"); string *s2 = new string("s2"); string *s3 = new string("s3"); for (int i = 0; i < m_subPipelineStrings ->size();++i) { pipeline &p = m_subPipelineStrings->at(i); p.push_back(*s1) ; p.push_back(*s2) ; p.push_back(*s3) ; }[/CODE] The question … | |
Hi, I am new to c++ programming.... i am working on a example and when ever i run the following code i get error "Server fifo failure" this is an example and should work alright but error making no sense... :( I am running this code using sun C++ compiler.... … | |
whenever i run the below program it asks me to type in a password and it should go through all that could possibly be the password but if i type in a password of 2 or more digits it only displays the first letter of the password. [CODE] #include <iostream> … |
The End.