64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Auto

After fixing some pointer problems with my structures, I decided to move the functions performed on them to another .cpp file. Here's the definition in my [B]main.cpp [/B] above the int main() of course [CODE][B]struct[/B] employee { [B]char[/B] name[[COLOR=Navy]20[/COLOR]]; [B]int[/B] schedule; [B]int[/B] level; }; [B]struct[/B] employee salesdept[[COLOR=Navy]10[/COLOR]];[/CODE] then in my …

Member Avatar for Auto
0
242
Member Avatar for Auto

I have a program that calls a function to generate an array of structures( data_set ). The structures consist of a char[20] and 2 int data types. Now what I'm trying to do is randomly pick from an enumerated data type and here is the code I have with a …

Member Avatar for Auto
0
154
Member Avatar for tenoran

Could anyone define "Memory leaks" well ? 'cause pretty hard for me to understand with C++ books.

Member Avatar for Acidburn
0
90
Member Avatar for dave2point0

Hi, I am making some software for microchips. I am currently developing some algorithms or the PC, and was wondering if there is a way to access a mouse button in very simple C, not c++, in the form of a variable, either on or off. Also, switch bounce is …

Member Avatar for dave2point0
0
155
Member Avatar for JoBe

Hi ladies and gents, I'm trying the next exercise: Write a function value, wich adds the decimal numbers of 'n' together and return the result of this into main? For example: 0.1234 = 10 0.01234 = 10 0.3286 = 19 What Ive got so far is this: [CODE] short amount …

Member Avatar for JoBe
0
299
Member Avatar for shouvik

"THINKING IN C++" a real cool book in C++ is available online and can be down loaded free of charge. The site is!!! [URL=http://www.codecuts.com/mainpage.asp?WebPageID=315]http://www.codecuts.com/mainpage.asp?WebPageID=315[/URL]

Member Avatar for Saelice
0
306
Member Avatar for Ajaxxx

I have the following code: [php]$rebate_query = tep_db_query("select * from " . TABLE_REBATES . " where product_id = " . (int)$HTTP_GET_VARS['products_id']); $rebate_information = tep_db_fetch_array($rebate_query);[/php] This should return only 1 row of data I have this code - " [php]$rebate = $rebate_information['rebate_amount'];[/php] " for extracting the rebate amount. For the life …

Member Avatar for Gary King
0
177
Member Avatar for Turiya

"Invalid procedure call or argument" As I try to remove an item from a listbox call List1 I try this code... If List1.List(i) = List1.List(i + 1) Then List1.RemoveItem (i) if the list contents are identical, remove one of them but it doesn't work!

Member Avatar for Turiya
0
399
Member Avatar for computerages

Hello everyone! I've been programming in PHP for 1 year and now I am looking forward to learn a computer programming language, but I am confuse...since there are several langauges out there. So what language you recommend? Thanks!

Member Avatar for vegaseat
0
301
Member Avatar for tommy1988

i wanna start programming with c++ what would you guys suggest is the best compiler program out at the mo? :twisted:

Member Avatar for Raven11
1
117
Member Avatar for sinB

[SIZE=2][B]TO CALL OTHER PROGRAMS FROM WITHIN OTHER PROGRAMS-[/B][/SIZE] Just include the standard c header file cstdlib (no .h!!). You can now use the function system( :eek: ). It takes only one parameter- the name of the program you want to call! Here is an example [CODE]#include <iostream> #include <cstdlib> // …

Member Avatar for aj.wh.ca
0
187
Member Avatar for Asif_NSU

I want to make a program that will start off by opening a text file(blank). The user will put an expression in the file and as he hits the enter(enters a newline character) the result will be shown in the next line of the same open file. Itz almost like …

Member Avatar for Narue
1
259
Member Avatar for ok555

Ok, im new to c++ and i looked around and couldn't find anything on it.. I have a global char such as the one below, i made a loop to go through and basically "grab" each name in the names list and then display it to me.. but instead of …

Member Avatar for ok555
1
163
Member Avatar for Phreak

Hi, i am currently wanting to create a VBS script that will do the following in this order: run gpedit.msc then close delete the default user folder in "c:\documents and settings" delete the gpedit folder in "c:windows\system32" copy the "default user" folder from my "memory stick" to the "documents and …

Member Avatar for Comatose
0
235
Member Avatar for NewVBguy

Hi, I want to know the date when is a file was created plus the size of the file. Can somebody show me a vb code that handle this things. Thanks in advance. Newvbguy

Member Avatar for NewVBguy
0
179
Member Avatar for dbarcode

How do you start/launch a 3rd party *.exe from within a VB.NET application. The program we want to run do have a few command swithces.

Member Avatar for dbarcode
0
130
Member Avatar for NewVBguy

Hi, I'm trying to make a backup program but suddenly i got stock with this problem. I want to search all the .txt file in my drive c: and make a zip file on their respective folders. Can somebody share a code for this one? Thanks in advance. Newvbguy

Member Avatar for NewVBguy
0
136
Member Avatar for vegaseat

I am not shamelessly promoting this book, I just happen to like it and use it a lot! "Standard C++ Bible" by Stevens and Walnum, published by Hungry Minds. This 800 page plus book is loaded with samples and comes with a CD-ROM containing all the samples and a nifty …

Member Avatar for wbk
0
177
Member Avatar for fastcarz3

can anyone come up with a solution for this ? real quick for me? the factorial of a nonnegative integer n is written n! ("n factorial") and is defined as follows: n!=n*(n-1)*(n-2)*.....*1(for values of n greater than to 1) and n!=1 (for n=0 or n=1). For example, 5!=5*4*3*2*1, which is …

Member Avatar for Narue
0
654
Member Avatar for JayseR

I'm trying this new project, like this. Write a program which will use functions to compute the distance between 2 points on a plane given their coordinates. If one point is located at (x1,y1) and the other is located at (x2,y2) then the formula for computing the distance is sqrt(sqr(x2-x1) …

Member Avatar for JayseR
0
522
Member Avatar for dallin

I have random numbers such as 1 6 8 5 7 3 9 2 4 in a 1 dimensional array what for loop do I use to reorder the numbers from 1 through 9? thanks.

Member Avatar for Narue
0
328
Member Avatar for Layla_2401

Hello Everyone, I'm a problem with a recursive C function. Before I explain the functionality of the code, I'd like to give a brief explination of what I'm trying to do. I'm working on a general tree data type which represents entities, each of which has a list -array- of …

Member Avatar for Layla_2401
0
334
Member Avatar for xfruan

Hello, i'm a novice who have some ideas of the basic concepts and some advanced topics like templates and exception handling. I now want to improve my programming skills. I would very appreciate if anyone could recommend some good books to me. :)

Member Avatar for xfruan
0
181
Member Avatar for Sphyenx
Member Avatar for vegaseat
0
246
Member Avatar for kloony

Hi Guys, it's me again! I have been posing memory-related problems for the past few days because I don't seem to understand what is the problem with my code. I kind of figured it's due to memory issues....so here's my question. Suppose I have a (first in first out) queue …

Member Avatar for kloony
0
356
Member Avatar for tat2dlady

Does anyone know how to compare a old style character string with a character in qoutes? Example: I want to compare the first character in a record that is stored in an old style character string with a `*`. Here's what I have in my code: char FirstCharacter[1]; // Character …

Member Avatar for tat2dlady
0
124
Member Avatar for dallin

I'm stuck, I have a base class String, derived class Pstring, and trying to develop another derived class Pstring2. Pstring2 needs a function called left. Main will call the function by Text.left(Text1,N) // Text2 is assigned the leftmost N characters from Text1. I'm having a hard time understanding how to …

Member Avatar for dallin
0
93
Member Avatar for new comer

hi i have just got my self a Borland 4.5 from ebay and would like some help in using it. i am very new to programing and i would like to be able to put a shoping cart on my website but i know nothing about it all help very …

Member Avatar for vegaseat
0
154
Member Avatar for trevs234

in a book there is a code that i am trying out and my compiler keeps giving me diferent errors (compiler is Borland C++) and i dont know how to fix them. the code is [code] //----------------------------------------------------------------- // Skeleton Application // C++ Source - Skeleton.cpp //----------------------------------------------------------------- //----------------------------------------------------------------- // Include Files …

Member Avatar for vegaseat
0
161
Member Avatar for oxyi

Hi, looking for an assmelby programmer for x86 today . Yes March 11. for a small project take only an hour or so. I am paying $30 or oOB paypal for it, please emaile me oxyigen@gmail.com Again, it is today only, and need it done by 6pm PST. This is …

0
105
Member Avatar for Maple_Tiger

In this book I'm using, Sams Teach your self C++, it says to: Start compiler, choose file, choose Win32 Console Application, choose empty project, choose C++ source file, edit source code, choose build, check that you have know build errors and run the program. Whats the difference betweeen Build and …

Member Avatar for Maple_Tiger
0
177
Member Avatar for NewVBguy

Hi there, I'm trying to print an ms word file using vb. Before it will go to printer, I want the document file to be viewable but not editable. Can anyone help me. Thanks, Note: I was able to view the doc file but it is editable. I am using …

Member Avatar for Comatose
0
161
Member Avatar for dani1982

i am suppossed to write a program using an array of strings to hold the words of the ICAO alphabet, and index the array by the positions of the letters of the alphabet. I started it off but cannot figure it out please help!! #include <iostream> const int n_row=26; const …

Member Avatar for Tight_Coder_Ex
0
239
Member Avatar for nanodano

I had the idea in my head to write a program that would let you select more than one image you want to set as your windows desktop wallpaper and have it rotate it every day, or every time you boot up or something similar. I really don't know where …

Member Avatar for vegaseat
0
105
Member Avatar for kloony

I have a first-in-first-out queue implementation such that when it is first initialized, a malloc is called to set aside memory for items that will be placed on the queue. When I am done with the queue, how do I free up the memory? My code for the queue is …

Member Avatar for kloony
0
482
Member Avatar for Acidburn

[php] #include <iostream> #include <cmath> using namespace std; class point { public: point(int xcoord , int ycoord); //constructor point(); int getX(); int getY(); double getDistance( point otherPoint ); void setpnt(point p); private: int x, y; }; class rectangle { public: rectangle(point p1, point p2, point p3, point p4); void perimeter(); …

Member Avatar for Narue
1
182
Member Avatar for firion

hi administrator, I'm a beginner in c++.I need to draw a graph(x vs y type).I used graphics.h and ended up with a very primitive version of a graph.The graph appears like a scribbling in the top left corner of the screen.I don't know how to draw the x and y …

Member Avatar for vegaseat
0
103
Member Avatar for Lapari

Hi there, I am working on an assignment that I have to create a menu. The user is suppose to select the menu and change form color. But I have no idea how to that. Help please. Anyone?

Member Avatar for Lapari
0
253
Member Avatar for evilsilver

ok here is my question, i use borland c++ builder 3 and in a book i found an example for a graphics.h program which is supposed to work but i have heard that this only works in dos mode not in windows (which i am running in) is there another …

Member Avatar for 1o0oBhP
0
123
Member Avatar for billy-student

I am new at programming and need help: #include <iostream> #include <cmath> using namespace std; int main() { int a, b, c, area, tri_area; area = tri_area(a, b, c); if area (area>0); cout << "Area is "<<area<<"!"<<endl; cout << " Those values tri_angle " <<endl; } double tri_area (double a, …

Member Avatar for Fasola
0
189
Member Avatar for JoBe

Hello ladies and gents, I'm starting on the next exercise, but I'm puzzled a bit and was wondering if any of you might help me with this. I have to enter four integer numbers, non negative and smaller then 16 into ONE variable int x, now, the thing I was …

Member Avatar for Fasola
0
443
Member Avatar for jonnie83

I am having a problem with inputs. I can get the input using the cin command but i want to use the input to open a file with the inputs name ie the user types in FRED. cin>>name i want to open a file called fred.txt ifstream in("name.txt"); the above …

Member Avatar for vegaseat
0
109
Member Avatar for tenoran

The assignment is to read and keep records and perform statistical analysis for a class of students. This is what I have done so far,then the codes can show the information(Id,4quizes,exam) of each students on screen. But I need to show 3 more things (The Highest ,The Lowest,The Average of …

Member Avatar for tenoran
0
136
Member Avatar for JonEdangerousli

Uber newbie here. Have downloaded three different form scripts but none of them will actually send the email. Using yahoo small business standard hosting which says they support php. The form appears to work, it refers to the correct page, but no email. I don't know how to enable logs …

Member Avatar for 1andyw
0
325
Member Avatar for compshooter

I have a couple of questions about the main function. Do you need to put the ; after the last }? Do you need to put a return statement before the last }? If so, what number do you put in the (), i.e. return (0), return (1), etc. What …

Member Avatar for vegaseat
0
153
Member Avatar for evilsilver

hey i am making a game and decided that i want to put a load/save option in it and was wondering if anyone here knew how to do this, (the program has to be able to close, open again and load the progress from before). I am running in windows …

Member Avatar for vegaseat
0
187
Member Avatar for Cherrio

Can someone help me find the error that keeps this prg from running thanx [code] #include <iostream> #include <vector> using namespace std; int main() { vector<int>v(1,1); v.push_back(2);v.push_back(3);v.push_back(4); vector<int>::iterator i=v.begin(); vector<int>::iterator j=i+2;cout<<*j<<""; i+=3;cout<<*i<<""; j=i-1;cout<<*j<<""; j-=2; cout<<*j<<""; cout<<v[1]<<endl; //output 1 (j<i)?cout<<"j<i":cout<<"not(j<i)";cout<<endl; //output 2 (j>i)?cout<<"j>i":cout<<"not(j>i)";cout<<endl; //output 3 i=j; i<=J&&j<=i?cout<<"i and j equal":cout<<"i and …

Member Avatar for Cherrio
0
114
Member Avatar for server_crash

I had all of this program finished except for the plotting like a week ago...Ever since then, I've been trying to figure out how to plot the stupid polynomials..I thought I had it, but the program seems to go crazy whenever it's suppose to repaint..It's like repainting components on top …

Member Avatar for server_crash
0
128
Member Avatar for scar_zone82

hello there ....can someone help me solve my problem of my assignment....i try to code it....so I need some guidances ... This is the question... An operating systems uses shortest job first scheduling for it’s process management. Assume that there are 10 processes waiting in a queue which is implemented …

Member Avatar for vegaseat
0
195
Member Avatar for roeschh2

i am having a problem with a function i am writing that takes in a txt file and stores the data in 3 arrays. The data file is always rows containing three numbers such as 1 2 3 2 3 4 5 6 7 8 9 10 with each column …

Member Avatar for roeschh2
0
82

The End.