49,757 Topics

Member Avatar for
Member Avatar for LostnC

Hello. I am beginner using C++. I have been searching through previous posts, but I haven't found anything to apply to my problem... I have a program that I initialize data into an array. I am using a Structure. After initializing the data, I use a Switch statement to allow …

Member Avatar for dusktreader
0
1K
Member Avatar for cgib

I created a .net (c++) dll which I'm using with a com application. In order to use the dll with com, I ran the sn,gacutil, and regasm/tlb utilities. Now, I added a dll from Microsoft Enterprise Library to my dll. When running the app, I get an error that the …

Member Avatar for Fbody
0
72
Member Avatar for mikabark

Thanks you guys.. I have one more question. I'm programming recursive directory traverse function. It will be called from main program with absolute directory name. I could printout in a simple 2~3 depth directory. But I could not in complex structure. (/lib/modules has two directory, and inside there, files and …

Member Avatar for Ancient Dragon
0
177
Member Avatar for gregarion

[CODE] string NewMovie = "ww"; string queryText ; queryText = "INSERT INTO movie_info (movie_title ) VALUES('" + NewMovie + "')" ; MYSQL *conn; conn=mysql_init(NULL); mysql_real_connect(conn,host,username,password,database,0,NULL,0); mysql_query(conn,queryText.c_str()); mysql_close(conn); return 0; [/CODE] What i would like to know is how am i able to do a check to see if such a …

Member Avatar for Fbody
0
141
Member Avatar for maddav

Hi, I'm very much a beginner to C++, but I've been assigned a project outside of my programming class that is starting to get tricky. I'm modelling a layered optical system and I need to create N two-dimensional arrays (2x2 matrices to be used in matrix multiplication), where N is …

Member Avatar for maddav
0
186
Member Avatar for iamfabian

Totally new to C++, so please forgive me... I'm trying to have a user input a filename and then check the file for all string literals. The output should return the string literal (not the whole line, which is what I am getting). Also, I have to ensure it ignores …

Member Avatar for tetron
0
387
Member Avatar for TheGhost

hi, im trying to learn how to make a keyboard hook for C++ to improve my cheat/macro app for a game; use keyboard hook instead of GetAsyncKeyState(). where can i find the codes for this and a line by line explanation about the use of the API? many of the …

Member Avatar for Ancient Dragon
-1
109
Member Avatar for Violet_82

Hi there, I am experiencing a problem during the program execution. Here is the program: [CODE]#include <iostream> using std::cout; using std::cin; int additions (int a, int b, int c) { int k; k = a+b-c; return k; } int main() { int s; int x; int y; int z; cout …

Member Avatar for Violet_82
0
132
Member Avatar for nola_Coder

I am working on a Pong game that also uses a gun to shoot out the rear wall of the playing box, so that the ball may escape. I'm using Dev-C++ and the Allegro library. There are two slight problems... 1) The "bullet" fired from the gun hits its target, …

Member Avatar for VilePlecenta
0
155
Member Avatar for hannon565

Hey am trying to read contents of a text file into memory and will be read later by a different function. This is how i am considering doing it I was thinking of reading the whole file into an array but thought it might be too big seeing as file …

Member Avatar for Nick Evan
0
3K
Member Avatar for BobFX

Hi, I'm trying to send an e-mail from a managed application. I found the following example: [code] MailAddress ^From = gcnew MailAddress("xxx@zzz.com"); MailAddress ^To = gcnew MailAddress("ttt@zzz.com"); MailMessage ^message = gcnew MailMessage(From, To); message->Subject = "Testing sending mail"; message->Body = "Body of message"; SmtpClient^ client = gcnew SmtpClient( "smtp.foo.com" ); …

Member Avatar for jonsca
0
616
Member Avatar for nola_Coder

This seems like something pretty basic, and I'm sure I'm just missing something, but I can't figure it out. I've been searching for a bit, and find several different suggestive solutions, but none of them were working for me. I'm sure I was doing something wrong. What I want to …

Member Avatar for nola_Coder
1
119
Member Avatar for stevechow

Does anyone know where I can find apvector methods or apmatrix methods? So far I know that... vector.length() = length of 'vector' matrix.numrow() = length of 'row' matrix.numcol() = length of 'column'

Member Avatar for jonsca
0
56
Member Avatar for nola_Coder

I am doing a Pong style game. As long as the paddle isn't moving upward at the time, it will reflect the ball like it's supposed it. However, if the paddle is moving forward, it will run over the ball and the ball will go through it. Here is my …

0
57
Member Avatar for ranjita.cdt.esg

Hope i have posted the mail in the rite place. what I have done so far is: 1>I use Borland C++ Builder Version 5. 2>I use TCppWebBrowser which can access a website. which could be done through any browser outside my application.So no point in what i have achieved till …

0
60
Member Avatar for ranjita.cdt.esg

Hope i have posted the mail in the rite place. I need to know the google map API to save maps to a folder. My borland c++ application should in the background download the map according to a gps latitude longitude and save the map in a folder. There is …

0
61
Member Avatar for aloplop

Hello, I load a web page in a TCppWebBrowser component and I would like to execute some JavaScript functions contained in the html file from the main programme. Is this possible?? Thanks.

Member Avatar for ranjita.cdt.esg
0
59
Member Avatar for khaled.s

[CODE] // // This program finds the area of a triangle given the points of the triangle. It computes // the area of the triangle using three different formulas, each will result in the same answer. // // Area1 = 1/2 | (x1y2 - x2y1) + (x2y3 - x3y2) + …

Member Avatar for Ancient Dragon
0
132
Member Avatar for geoldr

Hello, so I'm fairly new to C++ but not to programming overall. I have created a simple TXT file with about 15 words in them, and I would like to write a program which asks me for a number of words, you type it in (simple cout, cin) and it …

Member Avatar for hag++
0
107
Member Avatar for mikabark

I'm doing programming which can traverse subdirectory and show lists. If I check just file part, it was not problem. But when I do directory part, and have to recurse program itself(I marked as "from this part"), it show strcat segment error. I'm thinking it's problem if string and char* …

Member Avatar for WaltP
0
112
Member Avatar for timbomo

Did i use the code tag correctly ? let me know? Im trying to figure out how to error trap this program so if the user doesnt put in a valid response then a message will cum up and they will go back 2 the beginning until they do it …

Member Avatar for WaltP
0
155
Member Avatar for NjNetsFan1

hi im doing a project using the bubblesort feature. I have to print out an inputted array of 26 characters sorted by ascii characters. i need to print them out ascending and descending, and also print out the top 3 occuring characters and their counts. i also need the largest …

Member Avatar for NjNetsFan1
0
136
Member Avatar for Darkwarrior_331

Hiya, Daniweb! :) I have certain problem with a homework, we're supposed to do a "car race on a highway" (well, kinda) with vectors, so after the user defines how many lanes are in the highway and sets how many vehicles are in each lane (already done) the user sets …

0
36
Member Avatar for Dhanika

Greetings everyone! I hope to learn and become better in programming. But honestly, my heart fails me everytime I face a new assignment. This one is just another heartache. Thing is, the question wants me to print out n-bit strings in lexicographical order ( meaning increasing order ). And I …

Member Avatar for Dhanika
0
2K
Member Avatar for timbomo

i cant figure out why this outputs the wrong number when i say the length and width is 1 it outputs 2293544. and i dont know if its reading the 2 numbers i put in for length and width i use the magic formula and still does it case 'B':; …

Member Avatar for Narue
0
105
Member Avatar for WargRider

Dear Community, I know that Java and C# and various OTHER programming languages support a variable type Object, which is basically a variable that can hold ANY kind of variable type, from strings to booleans. I was wondering if this is possible in C++, I REALLY badly need something of …

Member Avatar for Narue
0
4K
Member Avatar for phohammer

I am attempting to create a GUI for a console C++ program in Visual C++. Apparently, it is like learning the language all over. Here is my problem: I am attempting to write the contents of a textbox to a file, but I get the error "error C2228: left of …

Member Avatar for phohammer
0
405
Member Avatar for mani_singh

hello all, i am new to c++ and just started learning about 1 week ago. i wrote a (console) program that does simple math, it asks you to enter couple numbers and will output an average. i want to know how to write and if statement where it will say …

Member Avatar for Dave Sinkula
0
83
Member Avatar for timbomo

[CODE]I cant get this to read these numbers correctly 11.95f, SQFT2 = 12.35f, SQFT3 = 13.28f, PI = 3.14159f, when i run it , the answer comes out to be a whole number 11.[/CODE] i also need help on the do while loop i almost got it but i ended …

Member Avatar for WaltP
0
83
Member Avatar for Jeronim

I'm writing some program and i was wondering is there any way to change ALL numbers in array at once for example when you initialise array you can write [CODE]int array[10]={0};[/CODE] is there anything like that i can use in the [B]middle[/B] of the program. I have googled for it …

Member Avatar for Narue
0
78

The End.