43,549 Solved Topics
Remove Filter ![]() | |
So, i wrote stack, which is using vector strategy in case of being too small. The code compiles well and works until the resize function is called to resize the size of array. Tnx for any help solving this error. [CODE=cplusplus]#ifndef STACK_H #define STACK_H const int DEFAULT_SIZE = 10; template … Software Development c++ | |
how do i create a set method to get the fstream input file. in need to be able to define the file location in the main method. [CODE]class a { private: ifstream fileOne; ofstream report1; public: void setinput(std::ifstream& in); void setoutput(std::ofstream& out); }; [/CODE] how can i code these set … Software Development c++ | |
i have a delimited file it has name|address|address2|phone number/n i found this code snippet of code which i modfied to almost do what i want. the problem is i want to only count the delimited char which is '|" and '\n' but the program is counting the char instead. here … Software Development c++ | |
I'm having problems reading taking an input using cin.getlin [CODE][LIST=1] [*]cout << "Enter record: "; [*]cin.getline(title, 100); [*]csis << "Enter record title: " << title << endl; [*]rec->setTitle(title); [*]cout << "Enter performer: "; [*]cin.getline(name, 100); [*]csis << "Enter performer: " << name << endl; [*]rec->setPerformer(name); [/LIST][/CODE] The program jumps to … Software Development c++ | |
Hi i've created an animation for a game where a set of blocks moves from left to right across the screen automatically through the use of a timer. However when i set the interval of the timer below 150 the image starts to flicker as it's moving. I've read that … Software Development visual-basic | |
Hi, I'm using C#.net 3.0. I have use the frameGrabber class to grab the frames from the video file and to convert the frames into bitmap format.The code is giving error in the "foreach (FrameGrabber.Frame f in fg)line of the code" highlighting "in" giving error---"InvalidCastException was unhandled by user"(Unable to … Software Development user-interface | |
Okay.. Lets say I have ten labels and I want a random number between one through ten in each label.. But in the labels I dont want to have duplicates so that way in labels 1 through 10 they will have an integer between 1 and 10.. But randomized.. Software Development visual-basic | |
Hello, I'm making a little app that runs through a Richtextbox and makes it turn string "[BK]" red. But I can't get it to make all of the "[BK]"'s red. i found this little piece of code, but I can't get it to work, it looks like it should though. … Software Development vb.net | |
[code=cplusplus] #include <iostream> #include<string> using namespace std; int main() { string str1="Amusement Park"; string str2="going to"; string str3="the"; string str; cout<<str2+''+str3+''+str1<<endl; cout<<str1.length()<<endl; cout<<str1.find('p')<<endl; cout<<str1.subtr(1,5)<<endl; str="ABCDEFGHIJK"; cout<<str<<endl; cout<<str<<endl; cout<<str.length()<<endl; str[0]='a'; str[2]='d'; cout<<str<<endl; return 0; }[/code] Software Development c++ | |
If I have /home/doriad/Scripts/Python/ and inside I have a bunch of folders, ie Geometry, Math, Other, etc that each contain scripts (.py files), is there a way I can just add /home/doriad/Scripts/Python to PYTHONPATH and then somehow [code] from Geometry/Spherical import * [/code] rather than having to add every subdirectory … Software Development python | |
Hello all. I have a small problem . How can I, in c#, windows forms aplication,ComboBox, use AutoComplete. Lets imagine that i have 5 items in the ComboBox that are : Abcd Abcdd Acc Accd Add If i start writing "ab" it will only display items that starts with "ab" … Software Development c# | |
HI, I am trying to construct a regEx pattern to match a UK tax code. The pattern i have created is "^(/BR{1}/|/D0{1}/|/NT{1}/)|^(([Kk]{1}[1-9]{1}[0-9]{2,3})|([1-9]{1}[0-9]{2,3}[LPTYlpty]{1}))" I thought this would match the codes as BR or D0 or NT or K followed by 3 or 4 digits or 3 or 4 digits followed by … Software Development regex | |
Hi, I was creating a Gui for one of my classes and I hit a major bump. I am trying to take words from a text file and just display it in the text box. I know how to read files, what I don't know is how to change the … Software Development c++ display file-system gui | |
I have to generate html files from .java files. I tried generating from eclipse but was stumped. there are just 4 files. Can somebody help me out. Send me a pm please!!! | |
I have two integer numbers. I want to find which number is greater than other one without using relational operators. Software Development c | |
Hi, do not know how possible is this but here it goes, i'm trying to declare an array once a program is running. This is how i'm thinking: [CODE][LIST=1] [*]int size; [*]cout << "Enter size of array: "; [*]cin >> size; [*]Holding *holdLib[size]; //this is a base class pointer array … Software Development c++ | |
Hello, I wonder what I need to do to use find() from <algorithm> to search in a vector containing some Struct, with two string vars. I'm not asking for codes now, I just want the principles. I written this, and got compilation error. [CODE=cpp] #include <iostream> #include <algorithm> #include <string> … | |
I'm trying GUI Library to see what fits me. I want to try GTK+ too. But I don't know where to start. At GTK+ site I took a look at C++ bindings [url]http://www.gtkmm.org/[/url] and found * glibmm 2.20 (stable) * gtkmm 2.16 (stable) * libgnomecanvasmm (stable) * gconfmm (stable) * … | |
I have a file format for storing text of any sort. It's a file format from a company, so I can't change it. Basically, in the beginning of the file, a series of "string starts on char#", "string length equals" values determines the "address" where a string starts and how … Software Development c++ file-system | |
I am trying to work with listbox in visual stuido 2008. I am new to c# as of 2 days ago however im very experienced with c++ and batch. I was wondering if someone could give me some quick help on how to use mouse clicks. In particular i have … Software Development | |
I'm new to C++ and I'd like to start correctly. But I need to know what are the best practices for code sharing, like: _ use [ICODE] int void (main) [/ICODE] instead of other statements; _ use standard libraries when possible; _ what are the naming conventions for C++? I've … | |
im trying to write a program to calculate BMI for practice. I have it working for the most part but im having trouble with 1 thing. I want to say if its any letter or not a number then display an error message. Here is the code that I need … Software Development visual-basic | |
Hello guys i began reading K&R but there problem in a code i dont really understand it here code of a sequeeze function [code] /* squeeze: delete all c from s */ void squeeze(char *buffer, int c) { int i, j; for (i = j = 0; buffer[i] != '\0'; … Software Development c | |
Hello everybody. I have a quastion: is it possible to play swf without flash player installed? I mean include swf and flash player itself in one exe-file. Software Development flash | |
I use this command to check for the Computername wich returns: [code] SystemInformation::ComputerName->ToString(); //returns: MYCOMP-EG03R8F [/code] When manually rightclicking "My Computer" and check what name I have, it says with lowcase letters: [B]mycomp-eg03r8f[/B] So it doesn´t return the correct name. It shows Capitals. But if I do this command instead: … Software Development c++ | |
I want to make an input stream parser capable of handling input in any of the following forms: [code] x y z x,y,z x, y, z (x,y,z) (x, y, z) [/code] Is there a clever way to do this? Or do I have to check the first character, if it … Software Development c++ | |
[CODE=csharp]private void txb_keydown(object sender, KeyEventArgs e) { //check if A key was pressed if (e.KeyCode == Keys.A { //OK } }[/CODE] The above code works fine, but how can I do this for the % key? Looked everywhere, I can check for the tilde key etc. but I can't seem … Software Development | |
how can i convert a hex value of a byte (unsigned char) to a short value? [code="c++"] unsigned char hexByte = 0x02; short value= ??? [/code] thank you for your help! Software Development c++ | |
Hello guys I m trying to code a program to fix indented code but problem is that i will use strstr to search for the for string then i ill read it till it encounted \0 then i wanna jump to next line to add 4 spaces before the code … Software Development c | |
Hello , I got this script that read directories, create a zip file with the date of the file, and put all files in that date inside Zip: dir=/iscsi/webserver231/; for subdir in "$dir"/*/; do find "$subdir" -type f -name 'ex??????.log' -exec bash -c 'for f; do f=${f##*/ex}; echo "${f%??.log}"; done' … Software Development shell-scripting | |
Hello, I have an assignment where i have to create few methods using linked lists. one of them is method that should create an integer singly list and return the head. While i know how to add a single node i am not sure how to create list of them. … Software Development java linked-list | |
Hello, I have been fighting with this assignment for almost 3 week now and it's almost ready besides one part that I simply don't understand. I would appreciate if someone could maybe translate it into "simple English" for me and maybe give me a little guidance. Basically we are writting … Software Development java | |
HI Iam created project in visual studio 2008,and once I compile coding,it give me error meassagee.The Error Meassage is [COLOR="Red"]Error 1 The type 'Microsoft.Office.Interop.Excel.Workbook' exists in both 'c:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Excel\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll' and 'e:\Test\Test\Test\obj\Release\Interop.Microsoft.Office.Interop.Excel.dll' E:\Test\Test\Test\Test.cs 13 67 Test [/COLOR] So what I did is I delete the Excel.dll in (\obj\Release\Interop.Microsoft\Excell.Dll,but once I complie it … Software Development assembly microsoft-office visual-studio | |
Hi, I'm currently having problem with my proj. And really need helps.. I am currently in a proj that need to create an application that is able to hav Client (PC 1)'s data store to Server (PC 2 and it is also where the database is being stored.) PC 1's … Software Development client-server open-source peer-to-peer vb.net | |
Is it possible to indicate that a class function you are calling is static? [code] class Point { std::string name; public: Point(){} static void DisplayName() { std::cout << "Point" << std::endl;} }; int main() { Point.DisplayName(); //this doesn't indicate the the member function is static //maybe something like this: //static_call(Point.DisplayName()); … Software Development c++ | |
I want to make a data report. I write a name (like: taher) in a text box then press a button and then (taher's) all data will show. how it possible? I want it many ways. like name, ID, date. I mean I write name or ID or date and … Software Development visual-basic | |
Hello, I am doing Login Screen in VS2008. When i logon with username and password in form it only checking the first field in database. How to do coding for checking all the fields??? This is my coding [CODE] Imports System.Data.OleDb Public Class frmLogin Private connstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data … Software Development open-source vb.net | |
hi, i'm having problems with my homework. I have to create a Base classes from which 2 classes have to be derived, then i have to write a program to test their function. The problem that i'm having is that i'm taking the input from the keyboard and passing it … Software Development c++ | |
A problem asks me to make a printf statement which will print out the members of the struct given, I wrote a program to make sure I would get the right printf statement. [code] #include <stdlib.h> #include <stdio.h> int main() { struct house { 5. char style[40]; int rooms; float … Software Development c | |
this is part of my app where i ask a user if they want to do something. they need to either input a "y" or a "n" for it to do something and if they input something else like a j, 1, 2 , ; , " any other character … Software Development java | |
[code=c++] void func(char*,int&);//A function returning no value and taking a char and reference to int as arguments. typedef void (*PTR)(char*,int&);//A pointer to function returning no value and taking a char and reference to int as arguments. void Func2(PTR);//A Function taking such a pointer as argument. PTR Func3();//A Function returning such … Software Development c++ | |
Hey, I've been trying to understand what the hell I'm doing wrong with this code. At the beginning, I include the DDRAW.H, and the code compiles with no problem, but as soon as I try using a function from that header, I get a linker error. The function I used … Software Development c++ | |
Good Day, I am also a newby to the JAVA world of developing. I am SERIOUSLY struggling with a homework assignment ... I have a swing program that is using a JFrame and the task is to calculate the average grade. First, a JOptionPane needs to be used to get … Software Development java java-swing | |
I have a problem about std::vector as member of class, I'm not clearly about the initialization mechanism [CODE=c++]#include <iostream> #include <vector> using namespace std; class Obj; //this is a Class object class Grid { public: Grid( ) { } ~Grid( ){ } protected: private: vector<Obj> v1; //initialization mechanism ? and … Software Development c++ | |
Hey guys I have to analyse a short program for school and the only keyword i cannot find a definition for if ORG. What does this do in assembly code?? Any help would be appreciated. Thanks Software Development assembly | |
Hi I have a question. [COLOR="Red"]The aswer is very short [/COLOR]I think. I got many different useful helps in different forums but [COLOR="Green"]still[/COLOR] my main question is [COLOR="green"]not answered clearly[/COLOR]! MY QUESTION: Can a [COLOR="Green"]not inline[/COLOR] [COLOR="Red"]method[/COLOR] have [COLOR="Red"]internal linkage[/COLOR]? This question is simple & clear (if you don't think … Software Development c++ visual-studio | |
Hi everyone, I've been combing the message boards for the last few days trying to find something that will work for me, but to no success. I had 0 experience with XSLT before this which definitely doesn't help out in the search but I am determined to learn. What I've … Software Development xml | |
problem i'm having is getSelectedRows() and getSelectedColumns().... they dont return anything when i select the rows. am i doing it wrong? i need it so when the button is pressed to output the selected strings[] [CODE]import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.*; import javax.swing.table.AbstractTableModel; import java.io.*; import … Software Development java java-swing | |
I thought I understood how tuples work, but that is not the case. [code=python] lose = ['skldhf', 'laweoirht', 'skdljhflkjhs'] print lose [/code] How would I get it to print of the three phrases randomly? No, those aren't what I will be actually using, I just haven't come up with what … Software Development python |
The End.