49,757 Topics
| |
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> … | |
dear people recently i have been given with this assignment where i have to read from a txt file and then print out the following. the full class list. the class list sorted by gpa the class list sorted by name initial the user enters the class average gpa. i … | |
Dear experts I have a large file with this format: [CODE] 1 7252 0.1613 1 7253 0.1613 1 7254 0.0645 1 7255 0.0409 1 7256 0.0394 1 7257 0.1872 1 7258 0.1872 1 7259 0.0986 ...... [/CODE] and I want to change this file to the binary format but it … | |
Dear DaniWeb, I am working on a source code editor using Scintilla and am currently having some issues with the CreateFile() function. It does not return an error when I am saving as a new file, but when I am saving changes to the current file, it returns INVALID_HANDLE_VALUE. I … | |
This is a very simple problem, but for some reason I can't get it to work. I need to empty a variable ( char fileName[MAX_PATH] =""; ). It needs to be to where when I use this that it sees if it equals "", this wont work if it equals … |
The End.