49,761 Topics

Member Avatar for
Member Avatar for bolx

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 …

Member Avatar for Kev06N
0
144
Member Avatar for DaMist

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 …

Member Avatar for kvprajapati
0
106
Member Avatar for Stefano Mtangoo

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

Member Avatar for Stefano Mtangoo
0
255
Member Avatar for Kiba Ookami

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.

Member Avatar for Stefano Mtangoo
0
238
Member Avatar for tartan

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 …

Member Avatar for Ancient Dragon
0
176
Member Avatar for Unhackmee

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 = …

Member Avatar for William Hemsworth
0
95
Member Avatar for youngfii

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 …

Member Avatar for jesseb07
0
114
Member Avatar for vs49688

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 == …

Member Avatar for ArkM
0
303
Member Avatar for waldchr

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 …

Member Avatar for waldchr
0
112
Member Avatar for phoenix911

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 …

Member Avatar for jephthah
0
194
Member Avatar for fadia

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 …

Member Avatar for mirfan00
0
303
Member Avatar for mirfan00

[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.

Member Avatar for mirfan00
0
65
Member Avatar for patria987

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..

Member Avatar for Salem
0
173
Member Avatar for Usura

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; } …

Member Avatar for siddhant3s
0
183
Member Avatar for Richy321

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 …

Member Avatar for Richy321
0
214
Member Avatar for hetngay

<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 …

Member Avatar for Ancient Dragon
0
154
Member Avatar for gumber

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 ? …

Member Avatar for JustinJose12002
0
216
Member Avatar for mbrc

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 …

Member Avatar for mbrc
0
95
Member Avatar for GSPprog

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 …

Member Avatar for GSPprog
0
418
Member Avatar for killdude69

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 …

Member Avatar for killdude69
0
223
Member Avatar for monkey_king

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 …

Member Avatar for ArkM
0
2K
Member Avatar for ttqtrang146

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 …

Member Avatar for ttqtrang146
0
130
Member Avatar for livedereh

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() …

Member Avatar for livedereh
0
115
Member Avatar for shindu

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: …

Member Avatar for shindu
0
248
Member Avatar for apo

/*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 << …

Member Avatar for tux4life
0
132
Member Avatar for fadia

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> …

Member Avatar for tux4life
0
196
Member Avatar for frowlaya

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] …

Member Avatar for frowlaya
0
122
Member Avatar for yakovm

[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 …

Member Avatar for yakovm
1
105
Member Avatar for defender_

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.... …

Member Avatar for defender_
0
152
Member Avatar for rtwister

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> …

Member Avatar for tux4life
0
101

The End.