199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for clutchkiller

Im not sure if this is how the process would work, but if i am to say create a header file named myheader and in that header wrote [code=c++] #define functionName { code... } [/code] and then wrote a .cpp file and in the source code I would #include <myheader> …

Member Avatar for Rashakil Fol
0
162
Member Avatar for ricksvoid

Ive created a database driven web app in visual studio that works great in visual studio. Ive stored the connection string in my web config file with the following code: localhost/sqlexpress ect ect.... Works great!!! Now how do i adjust the connection string to work on a remote server. I …

Member Avatar for vuyiswamb
0
90
Member Avatar for gamerprog

I'm programming this RPG, and I can't get past the first battle. I can't figure out how to get the computer to break the loop when then enemy's health (enhp) is less than 1. I tried using an if statement, but then it didn't loop at all. Could you guys …

Member Avatar for Murtan
0
2K
Member Avatar for jls7168

I am trying to make a table of all the ASCII characters but am having some trouble. I have all the characters printed in a list order, but need to make it into about 10 columns across. Any help is really appreciated. Here is my code so far...[CODE]import corejava.*; public …

Member Avatar for jls7168
0
76
Member Avatar for shimbardy

Hello, I am new to java with some experience in C++. I am trying to write code that reads two different times and displays the difference in hours and minutes. 0 is midnight and the input should be in 24hr format. This program should work even if the first time …

Member Avatar for stephen84s
0
291
Member Avatar for jsand2

So I have been looking around and have not been able to find an answer to this. The program is for the most part complete and runs with one exception. When I enter "stop" it still runs through the program before exiting (i.e. after I enter stop it still asks …

Member Avatar for stephen84s
0
394
Member Avatar for khr2003

hello I am trying to make a script that can upload multiple files (currently I set it to five). I made the form look like this: [CODE]$i = 1; while ($i <= 5) { $form .= "here goes the content of the form"; $i = $i + 1; }[/CODE] I …

Member Avatar for diafol
0
265
Member Avatar for LucyB
Member Avatar for gaurisweet2
Member Avatar for Jx_Man
0
73
Member Avatar for matrimforever

What do I need to gather all lines of numbers say 88 on one line, and 92 on the second and so on? I have: ifstream theFile("grades.txt"); theFile >> sc1 >> sc2 >> sc3;// this gives me each number, but I need to be able to read them all then …

Member Avatar for Comatose
0
1K
Member Avatar for Teethous

Hi. I'm David a newbie. I have just started Classes in C++ and I'm doing a GPA Calculator program. I have most of the program working but the average calculator seems to be giving me trouble. Please help. This is open to constructive criticism. All inputs will be gladly appreciated. …

Member Avatar for Teethous
0
346
Member Avatar for oblivion4

Hi, I'm working on learning OpenGL using Visual Studio 2005 and I ran into these errors: [code]1>circle.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) 1>circle.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "long __stdcall WndProc(struct HWND__ …

Member Avatar for oblivion4
0
160
Member Avatar for SoulMazer

Hello, if you have seen any of my other posts you will know I am working on a script to make a "vocabulary test". I currently having it functioning nearly perfectly, except I get an error if I enter the wrong word. Code: [code=python]def vocabtest(): for r in words.values(): count …

Member Avatar for SoulMazer
0
102
Member Avatar for egee

anybody out there please help me out fix these bug in my code. i really couldnt figure out what's wrong with my code. input should be in a string, and the output should tell wether its a palindrome or not please![code] import java.lang.*; import java.util.*; import java.io.*; public class istak …

Member Avatar for egee
0
96
Member Avatar for ITlang007

Whats up guys, I'm writing this java program and I'm having trouble with Strings. Does anybody know how to write the following methods? public void bubbleSort() //sorts the array strings using Bubble Sort Algorithm (ascending) public void selectionSort() //sorts the array strings using Selection Sort Algorithm (ascending) public void insertionSort()//sorts …

Member Avatar for ITlang007
0
62
Member Avatar for Dr_Mithak

this is the quick sort and I know that it has O(n^2) time complexity at worst case (when data is already sorted) put how I count the operation that makes this time complexity i.e which part of the code will mostly excute when elements are already sotrted so that when …

Member Avatar for Arlekean
0
388
Member Avatar for clutchkiller

I have declared kbSize as an integer earlier in my code as a global variable, so there's no confusion from replies with it being local, and have a formula that process's its value, but for some reason when my program hits this if statement, it always calls timeStamp(); even when …

Member Avatar for clutchkiller
0
71
Member Avatar for RayvenHawk

I'm working on an assignment that I need to move a sphere around the screen with the keyboard arrows. I got the movements working and all that. But I'm drawing a blank on an "if" statement to prevent the image from going off the screen when the edges are reached. …

Member Avatar for RayvenHawk
0
108
Member Avatar for andyv

Hi all. I am trying figure out why the compiler is giving me this error message: error LNK2001: unresolved external symbol "double __cdecl calcWindChill(double,double)" (?calcWindChill@@YANNN@Z) HomeWork3.obj I've declared, defined , and called the calcWindChill() function. I've obtained the values needed to feed into the function. They're not getting put into …

Member Avatar for Ancient Dragon
0
217
Member Avatar for StainlessSteelR

I have to create a program that reads data from a file about census info specifically a last name and the frequency of which last name appeared in census. I have to call a function to read in the data, calls a function to display the data, do a binary …

Member Avatar for StuXYZ
0
809
Member Avatar for z00mit

Hi Guys, I am trying to serialise a SAFEARRAY to a string. I tried this: SAFEARRAY* content; ... CComVariant value( content ); value.ChangeType( VT_BSTR ); BSTR bstrValue = value.bstrVal; _bstr_t temp; temp.Assign(bstrValue); std::string content(temp); However I get this error: error C2040: 'content' : 'std::string' differs in levels of indirection from …

Member Avatar for Ancient Dragon
0
840
Member Avatar for gavy

Hi, I am using a Flash Component provided in asfusion.com to upload files in Coldfusion. I used in my flash forms exactly the same way as it is defined in the focumentation as; <cfformitem type="html"> <cf_flashUpload label="Upload Picture: " name="logo" fileTypes="*.jpg;*.png;*.gif" fileDescription="Image files" actionFile="upload.cfm"> <cf_flashUploadInput buttonStyle="corner-radius: 0;" inputStyle="fontWeight:bold" inputWidth="180" uploadButton="true" …

Member Avatar for Prodian
0
174
Member Avatar for r0ssar00

I'm currently developing a program to scrape my university's online timetable system and then convert the resulting data to iCalendar data. It's a learning exercise for me(I'm teaching myself C++) and there's a few things that still get me. I've been using XCode as my IDE for a while and …

Member Avatar for r0ssar00
0
142
Member Avatar for MrVile

I'm getting a compile error with this bit: [code]int valid(const char str[]){ int i, total = 0, multiplier = 10; for(i=0; i < 11; i++){ str[i] * multiplier += total; //this line is an invalid lvalue multiplier--; } if(total % 11 != 0) return 0; else return 1; [/code] I …

Member Avatar for MrVile
0
268
Member Avatar for neoseeker191

I have an assignment for class and I am having a bit of trouble. I need to do a few things to improve the efficiency of this program. The first thing I am having trouble with is that we are supposed to modify the shuffle function to loop row by …

Member Avatar for neoseeker191
0
1K
Member Avatar for magnum7

Hello, I've been trying to solve a problem for quite a few hours. There's a 3x3 matrix with the digits 1-9 randomly placed. The task is to palce the digits in a particular order so that every number formed on a column or roll or diagonal can be devided by …

Member Avatar for VernonDozier
0
332
Member Avatar for tomtetlaw

I want to know how to position and rotate a gun to make it look like it does in other FPS games, any help?!?

Member Avatar for tomtetlaw
0
132
Member Avatar for vartikachandra

how do i read character by character from a text file?I need to check for "\n" and split the file on it. for eg: I am a girl.I livein acd. My name is sdljnl. usoihuid. So finally i want to delete the 1st msg(line) from thefile so that the file …

Member Avatar for vartikachandra
0
93
Member Avatar for clutchkiller

is there a way to contain the text in a normal format when writing out to a text file? By this i mean, if i have cout output a million a's, instead of one long line if u open and view the txt file, it is many rows. Thanks

Member Avatar for clutchkiller
0
108
Member Avatar for Liszt

I have made a Form application that contains of 2 Forms. In these 2 Forms I have added controls and a lot of code behind. How will I "Close the code" to this project so no one can open it and see all my code that I have done. I …

Member Avatar for Liszt
0
86
Member Avatar for rajeesh_rsn

Hi I had a community web site and I need to show "Recent Visitors" under a profile ( just like in Orkut ) I do it successfully and that will show in the page like this ... Name1, Name2 , Name3 .. But I need to make link in each …

Member Avatar for Andrieux
0
181
Member Avatar for wotthe2000

Hi I have certain number of books which each have an author, title and ISBN number. How is the best way I can store this so that when I want a list of the books I will be able to list the books with the title, author and ISBN number? …

Member Avatar for Ghostenshell
0
153
Member Avatar for mahdiahmadirad

Hi Dears! I am a Beginner, Please Help Me. If you Can Help me to find out how to sort a 2d arrays of characters with [U]recursive bubble[/U] sort algorithm. I have got something but it doesn't work. what is my mistake? I Did codes below So far, but it …

Member Avatar for cikara21
0
802
Member Avatar for kohkohkoh

[COLOR=black]Hi, i am trying to use new method in asp.net for the database connectivity. --> using gridview[/COLOR] [COLOR=black]yet i am facing problem here in the "adding new" area.[/COLOR] [COLOR=black][/COLOR] [COLOR=black]here goes my code:[/COLOR] [COLOR=black][/COLOR] [CODE] <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> …

Member Avatar for Clawsy
0
366
Member Avatar for winrawr

[icode] someprogram.cpp -----------> #include<string> | | #include"someheader.h" V someheader.h --------------> #include<string> [/icode] what happens if I do this? Is it necessary to include the headers into all files that use them, or can you just go [code=C++] #include<string> #include... #include"someheader.h" #include"anotherheader.h" [/code] and string and other required headers will be …

Member Avatar for cikara21
0
87
Member Avatar for athlon32

I don't know if this is the right place to post this but here goes nothing. I know this is such a cliche from us C++ coders, but I wanna make my own open source OS. I would use something like BSD or Linux, but I really wanna use C++ …

Member Avatar for shasha821110
0
113
Member Avatar for lonely_girl

Hi. Ive made this program using if statements i see no errors in it but i dont know my program isnt working on my if statements i mean the if statements are not used in the output. Can u plzz figure out the problem? It works only till scanf statement. …

Member Avatar for lonely_girl
0
145
Member Avatar for smhnaji

Hello friends As you know, the way to manage the code that you write, is very importnant. By manage, I mean that you have a good way to know where to control the core of the project, the objects' act, and managing separating view from object core. As I've reasearched, …

Member Avatar for death_oclock
0
120
Member Avatar for encee

i am trying to read a text file like this and store each number as an integer (without the decimals) and print them 1 3 5.6 3 2.1 4 2 2 3 4.2 1 here is what i have now [code=C] #include <stdio.h> #include <conio.h> void main() { int i, …

Member Avatar for me_ansh
0
1K
Member Avatar for kashyapanirudh

Hi, I want to build an application that can send messages to computers connected over a LAN. This is something just like Email over LAN. It must also be possible to attach files just like an email. Can someone just help me as to how to go about building this …

Member Avatar for Ramy Mahrous
0
80
Member Avatar for slnvpraveen

/* MATRIX ADDITION */ #include<stdio.h> #include<conio.h> #define MAX 100 struct Matrix { int Element[MAX][MAX]; int No_of_Rows; int No_of_Cols; }; void MatrixAdd(const struct Matrix *,const struct Matrix *,struct Matrix *); int i,j; void main() { int p,q; struct Matrix Mat1; struct Matrix Mat2; struct Matrix res; clrscr(); printf("\nEnter size of the …

Member Avatar for Aia
0
93
Member Avatar for aasukisuki

Hi everyone Hopefully I can describe this issue properly. For ease I'm going to use a hypothetical situation. Lets say I'm working on a program that tracks the number of times 2 employees have worked together. Here's a week example: Mon - Tom, Bob, Al Tue - Tom, Al, Cindy …

Member Avatar for Ramy Mahrous
0
225
Member Avatar for hieuuk

Hi, I just write a tutorial about making a very basic Space Invaders using C# and XNA. It earned me 800 pageviews in just over 1 day, so I think It would be helpful for you :). If it's not, sorry for the incovenient, if it is, it would be …

Member Avatar for hieuuk
0
117
Member Avatar for Trendkiller

I can't find the error and also C2182 error: illegal else without matching if. [code=c] #include <stdio.h> int main (void) { int count=0; //counter int hours; //hours char choice; //users choice for continuing float total=0; //total charge //print display printf ("%-15s %-10s %-10s","Customer","Hours","Total Charge"); //assinging customer number count++; //ask for …

Member Avatar for me_ansh
0
331
Member Avatar for me_ansh

Hello every one, I have a confusion regarding arrays and pointers, My question is: "Is array name a pointer (rather a constant pointer)"?? I feel the answer is 'yes' because we can use the de-referencing operator(*) with the array name, Also, because array name is a constant pointer so we …

Member Avatar for Narue
0
266
Member Avatar for asharrajpoot

i want to show output like this [code] A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B …

Member Avatar for me_ansh
0
189
Member Avatar for Faterin

I use this [code] #include <fstream> #include <iostream> using namespace std; class Student { public: char FullName[40]; char CompleteAddress[120]; char Gender; double Age; bool LivesInASingleParentHome; }; int main() { Student one; strcpy(one.FullName, "Ernestine Waller"); strcpy(one.CompleteAddress, "824 Larson Drv, Silver Spring, MD 20910"); one.Gender = 'F'; one.Age = 16.50; one.LivesInASingleParentHome = …

Member Avatar for damani88
0
257
Member Avatar for madrang

Hi, i'm making my own game engine on sdl + opengl i also know that i can manage file for my setting and save game that way (i am on windows) [code] #include <windows.h> void ini::setfile(std::string name) { name += ".ini"; std::string directory; char path[1024]; GetModuleFileName(NULL, path, 1024); directory = …

Member Avatar for madrang
0
109
Member Avatar for thehivetyrant

[B]Hi i've been assigned with doing a torn square, and i've kinda got it working with the code below.[/B] [code] import turtle turtle.reset() length=100 degree=60 i=0 while i < 4: turtle.forward(length/length*40) turtle.right(degree) turtle.forward(length/2) turtle.left(degree+degree) turtle.forward(length/2) turtle.right(degree) turtle.forward(length/length*40) i+=1 turtle.right(90) else: raw_input("there's hopefully a square, all torn like!") [/code] as you …

Member Avatar for thehivetyrant
0
493
Member Avatar for JamesPatrick

Hi all! I can code queries well, but not confident with designing and normalization skills as yet. I wanted some advice on how you would go about putting together a db to house just this data. I'd like to see it in 3NF. The cranes move, so start date and …

Member Avatar for pclfw
0
172

The End.