43,549 Solved Topics
Remove Filter ![]() | |
hi all could any 1 knows how to add color to printf? i mean that i want to write a sentence with color in it. thanx! Software Development c | |
I think I just did found this out: [code] Put.str(""); [/code] How is it possible to ´emty´ a std::stringstream. In this case Put contains: 10. [code] std::stringstream Put; int i = 10; Put << i; [/code] Software Development c++ | |
hi , my program calculate the area of rectangle , and I have some errors , and dont know how to correct them . this is the program , [CODE] #include<iostream> using namespace std; class Rectangle { private: double length ,width ; public: double getW(); double getL(); void setW(); void … Software Development c++ | |
Hey everybody, I have multiple buttons on a form, I need to make them all have the same click event, which displays the name of the sender button. I knew that in order to make them have the same event handler, I should make there delegates refer to the same … Software Development | |
Hi Guys, I'm trying to read a while with the following formate 1999 43558047 2000 59068567 2001 67098709 ......................... ........................... I'm not sure how many records are in the file. Now I want to read this file using struct mystruct { double x; //this would be first column double y;//this … Software Development c | |
In an attempt to improve my coding skills, I decided to program a very simple DOS calculator. However, when i try and compile the program, I am presented with with following: [CODE]------ Build started: Project: Basic Calculator, Configuration: Debug Win32 ------ Compiling... Basic Calculator.cpp c:\documents and settings\my documents\visual studio 2008\projects\basic … Software Development c++ visual-basic visual-studio | |
Hi all The string_in function below is intended to take two string pointers as arguments and if the first is contained in the second, return the address at which the contained string begins. [CODE=C]#include <stdio.h> #include <string.h> #define TEST "This ain't a drill" char * string_in (char * str1, char … Software Development c | |
I have a problem installing .net on my machine.It gives the error massage:Install security updates and I don't have facilities to download security updates.Is there a compiler for c# free of charge ,can enyone post a link. Software Development c# | |
I am new to C++ I recently been trying to write an Game data base in C++ but I succesed in nothing though the Code seem to be all right it always shows me error messages this is the Source Code i created for this program: [CODE] #include<iostream.h> #include<conio.h> #define … Software Development c++ | |
This came up in another thread. I gave some advice that I'm not longer sure of. Rather than hijacking that thread, I figured I'd start my own. I advised against using the == in that thread. The context was this: [code=cplusplus] string subChoice =""; getline(cin,subChoice); if (subChoice == "100") { … Software Development c++ | |
[QUOTE]Hi, I have an assignment where I need to take a string and display it in reverse order and then convert anything in upper case to lower case and vis versa. I have the first piece of the code, but I'm not sure where to begin with the second piece. … | |
When is it better to use random-access ? When is it not? When is it better to use sequential-access? When is it not? So far I'm only sure to use random access in a situation where I'm dealing with a fixed number of records. For example a record of rooms … Software Development c | |
Hi, I'm wondering how your supposed to find out a widget's width in tkinter.. Little example code to explain (doesnt do anything at all) [code=python] class CustomWidget(Tkinter.Frame): def __init__(self, master, **kw): apply(Tkinter.Frame.__init__, (self, master), kw) self.masterWidth = # ???? Totally stuck, tried obvious things like master.width class MainWindow(Tkinter.Toplevel): def __init__(self, … | |
I have a GridViewControl on my Form in C++ .NET. I have put values to Rows and Columns like this: (3 columns and 5 rows) 1 a f 2 b g [B]3 c h[/B] 4 d i 5 e j What I wonder here is if I click with my … Software Development c++ | |
When i compile my program i get the error "floating point exception". I do not know why this is occurring my code. I am hoping that this is the reason why nothing is being put into my outfile. if it is possible could you look at my code and give … Software Development c++ | |
I understand how to use CreateProcess, ShellExecute(Ex), _spawn, exec methods to start a child process from a parent process. Question: Is there a way I can return values back to the parent process from the child process? For example, the child process sets an integer value and I want the … Software Development c++ | |
this is some of code. I have a question. what is the meaning of '?' and ':1;' [just this part] [code=syntax] int t, dt, * cnt, tmax=0; cnt=(int*)calloc(M,sizeof(int)); ... /* Compute the mean-squared displacement using the straightforward algorithm */ fprintf(stderr,"# computing...\n");fflush(stderr); for (t=0;t<M;t++) { for (dt=1;(t+dt)<tmax;dt++) { cnt[dt]++; /* number … | |
I have been using VB.Net for a little while now, but I just started needing to write code to put information in a SQL Server database. I have two tables that I need to add information into. I know that I have to use an Insert statement, maybe I need … | |
can anyone tell me what makes C a universal language and ideal for a number of engineering solutions? Part of an assignment would be ace if someone could give me a few pointers Software Development c engineering | |
I need to create a program that is a table to convert between centigrade and fahrenheit temperatures. My solution must must utilize functions to perform the conversions. Requirements: 1. One of the functions must use pass-by-value, returning the converted measure 2. One of the functions must use pass-by-reference to store … Software Development c++ | |
I was wondering if you could add new fonts to pygame and how you should do it. Does any one know how to do it? Software Development python | |
please explain What are the following data types are and the storage requirements of each? -Char -Unsigned Char -Int -long -float -double Would be great if someone could help me out, thanks | |
I'm almost finished with this program but the problem I'm having is with freeing the memory I allocated. Particularly in the area where I have pointers to strings. [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> /////////////// user defined data ///////////////////// struct State { char * name; // state name int year; … Software Development c open-source | |
Hello, I am doing a file input/output. I wrote 3 fulls names, phone number, balance. etc inside my input file. Example: John Doe 555-555-5555 5000.00 In my output file, I am trying to create this output with using setw. First Name Last Name Phone Number Balance ------------ ------------ ----------------- --------- … Software Development c++ | |
When I have [ICODE]sizeof(utmp)[/ICODE], 384 is returned. So when I try to find out the size of the individual members, I get a different result. Using the method below, I come up with 382 bytes. Anyone know where I'm missing the other 2 bytes? [CODE=CPP] #include <iostream> using std::cout; using … Software Development c++ | |
hi. i recently implemented S-DES algo. Here is the code for key generation. [code] import java.math.*; import java.security.*; public class keyGenerator { int bitLength=10; int certainty=20; int i=0,j=0,tempInt1,tempInt2; long l; byte[] actual10Key=new byte[10]; byte[] permuted10Key=new byte[10]; byte[] permuted10KeyCopy=new byte[10]; byte[] cls10Temp1=new byte[10]; byte[] subKey8Temp=new byte[8]; byte[] subKey1=new byte[8]; byte[] subKey2=new … Software Development java | |
Before I start, I'm sure you've all seen this error, and explained how to solve it many times before, and for that I thank you for bothering to read this, and if you choose to answer, I wish to thank you in advance. So, the issue I am having is … Software Development c++ | |
What is the way to convert this int to a std::string. I have searched MSDN and found that itoa could be used (vs atoi for string to int as I know how it is done). Though I cant find any good example that shows how itoa is used or if … Software Development c++ | |
I am using a "GriedViewControl" with 14 columns and with this code below I can set the number "1" to the First Column and 21 Rows down. What I wonder is how I access for example [COLOR="Green"]column 3 and row 1[/COLOR] or [COLOR="green"]column 4 and row 2[/COLOR] etc... What is … Software Development c++ | |
This is the first time I have ever had to do a simulation type program. This is what I'm trying to do: Your application should use an array of tellers (10 tellers would be a good maximum) but on any particular run of the simulation, any number of tellers from … Software Development java java-swing queue | |
I am confused in tellg funtion can any body tell me its syntax also for seekg();. Software Development c++ | |
I'm having a problem maintaining the data in the file. Everytime I enter a person's data the display code I have only displays the first one I entered. I'm not sure if there's somethin wrong with the creating or populating or just the display code I'm using [CODE=c]void addReserve() { … Software Development c | |
Hey guys, new poster here. I'm rather desperate here, I just do not understand the concept of templates very well. I've used the search function, but I don't see the problem addressed in any other threads. Any help is much appreciated. My assignment is to create a templated vector class … Software Development c++ | |
Hi all, I have a problem with Java GUI. How can I set a certain component to be in front of another component or behind it?! i.e. Is there a way to: SendToBack & SendToFront in java? | |
Hello, I am having a problem to call a function I am posting the code... Can anyone help how we can solve the problem... [CODE]int AES(string path1, string path2) { ifstream myfile1 (path1, ios::binary);// error ofstream myfile3 (path2, ios::binary);//error } int main() { AES( "c:/plaintext.txt" , "c:/cipheretxt.txt" ); return 0; … | |
Hello, C newbie here... below is a driver for a pretty simple function which is supposed to read in n chars from input and store in a char array. [CODE=C]#include <stdio.h> #define SIZE 81 void get_str (char * array, int n) ; int main (void) { char instr [SIZE] ; … | |
Hi, I m trying to scroll the JLabel by adding JLabel to Jscrollpane,I can see the scrollbar,but I can't scroll as well as I found JLabel's are misplaced.Can anyone please help me to solve this. The following is the code, [code=java]class outerWindow extends JFrame implements KeyListener,ActionListener { Container c = … Software Development java | |
Hello Everybody, If I'm a Java Newbie I am even more hopeless in VB... I'm using the Trial version of VB 8. I need to find out why am I getting an InvalidCastException on the line in red... I tried taking the .Text out but then it won't recognize it. … Software Development visual-basic | |
Is there anything in C# that does the same function as strtok in C++. For example if I had the following C++ program how would it be written in C#? [code] // crt_strtok.c /* In this program, a loop uses strtok * to print all the tokens (separated by commas … Software Development c# | |
Hi all, I'm trying to figure out how I can call the function estimate from the main. It takes as input: [code=c] float data[], int n, int m; [/code] and should output the float *xms and the float array float d[]: [code=c] float *xms, float d[] [/code] I don't know … Software Development c | |
Can we do like this in enums enum myStringEnum { enumItem1 = "value 1", enumItem2 = "value 2", etc } i.e.spaces in the string value, I know we can assign int value to enum but I m not sure whether string values (with spaces) can be assigned to enums. If … Software Development c# | |
I have created an application in VS 2005 pulling reports created in Crystal Reports XI Release 2. My problem is I have a couple of reports that have linked subreports on them. Does anyone know how to pass a parameter value to a subreport in .NET? I have the following … Software Development vb.net | |
Hi all, I am new here and to programming and i am currently trying to build an interactive form for my works. I have my form which at the moment saves text from textbox1 to a .txt file and also i have succeeded in being able to read this back … Software Development file-stream | |
Hi friends, I have written a function which inverts a dictionary. The code is as follows: [code=python] def histogram(s): d={} for c in s: #print c, d.get(c,0) d[c]=d.get(c,0)+1 return d def invert_dict(d): inv={} for key in d: val=d[key] if val not in inv: inv[val]=[key] else : inv[val].append(key) return inv hist=histogram('parrot') … Software Development python | |
I cant seem to figure out whats wrong with this code, I am trying to generate random floating point number numbers with values from 0 to 1 with positive and negative values here is the code [CODE]#include <stdio.h> #include <stdlib.h> void populate(int generations) { int seed, ttt; seed = 456739853; … Software Development c | |
Hello all, This is my first post here, this board seems to contain interesting stuff regarding C++, that's why I subscribed into it. Ok, let's go the problem... I have a class with two methods into it: floodLog writeToLog floodLog is intended to create threads that will execute the method … Software Development c++ | |
Hi...Plz i'm facing some problems on how to make my program work successfully. i'm a beginner in the c++ and i have an assignement to make a text editor using the devc++..it requires certain functions and i've written this code so far but i can't handle except the choice number … Software Development c++ open-source | |
Howdy, hoping I can get alittle help today. First off I have a real bad habit of learning one thing, and getting very fascinated by it and going off on a tangent using what i learned in as many ways as I can think of. Im a very new person … Software Development python | |
I would like to populate a listbox with multiple columns of data retrieved by a query. I am using the Listbox.DataTextField = "SpaceID" to get one value but can't seem to append others using lines like Listbox.DataTextField = "SpaceID" & " " & "SpaceName" Is there a way to do … Software Development vb.net | |
I'm having a tough time conceptualizing this problem. I have a recursive function computing the number of possible combinations of two numbers. I have it working fine, just need one thing sorted out. My output needs a counter to increment each recursive step. Like this: Level 1: ... Level 2 … Software Development c++ |
The End.