64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for ganmo

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> …

Member Avatar for ganmo
0
289
Member Avatar for Stefano Mtangoo

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) * …

Member Avatar for Stefano Mtangoo
0
304
Member Avatar for QuintellaRosa

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 …

Member Avatar for ArkM
0
255
Member Avatar for shijunair

hello everyone, I am stuck with this problem.If anyone could help me, it would be a great favour. I am working on a leave application. Here the leaves are been applied by employees and accordingly the leaves are been approved or cancelled. so the problem is that when i am …

Member Avatar for shijunair
0
2K
Member Avatar for DevC++4.9.9.2

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 …

Member Avatar for ddanbe
0
156
Member Avatar for QuintellaRosa

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 …

Member Avatar for Ancient Dragon
0
80
Member Avatar for plysaxaphone

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 …

Member Avatar for FlamingClaw
0
109
Member Avatar for lolguy

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'; …

Member Avatar for lolguy
0
163
Member Avatar for JAGjug

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.

Member Avatar for JAGjug
0
85
Member Avatar for Liszt

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: …

Member Avatar for Liszt
0
210
Member Avatar for Venom Rush

Hi Guys/Gals I have a page that has iFrames on it. Now the pages that are shown in the iFrames each have their own code on them. I'd like to know if it's possible to use variables that are on the page holding the iFrames in the pages inside the …

Member Avatar for Venom Rush
0
71
Member Avatar for daviddoria

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 …

Member Avatar for ArkM
0
86
Member Avatar for ddanbe

[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 …

Member Avatar for ddanbe
0
159
Member Avatar for dav555

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!

Member Avatar for dav555
0
286
Member Avatar for lolguy

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 …

Member Avatar for lolguy
0
104
Member Avatar for joinup

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' …

Member Avatar for joinup
0
108
Member Avatar for grisha83

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. …

Member Avatar for hardik.rajani
0
112
Member Avatar for Magda

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 …

Member Avatar for JamesCherrill
0
146
Member Avatar for Kusno

Dear all, I use asp:button field in my gridview [CODE] <asp:GridView ID="GV" runat="server" DataSourceID="SDSInHouseRate" Width="100%" AutoGenerateColumns="False" OnRowCommand="GV_RowCommand" OnRowCreated="GV_RowCreated"> <Columns> <asp:buttonfield buttontype="Button" commandname="edit" text="Edit"/> <asp:buttonfield buttontype="Button" commandname="approve" text="Approve"/> <asp:BoundField DataField="Seq" HeaderText="Seq" SortExpression="Seq" /> <asp:BoundField DataField="CurrencyID" HeaderText="CurrencyID" SortExpression="CurrencyID" /> <asp:BoundField DataField="EffectiveDate" HeaderText="Effective Date" SortExpression="EffectiveDate" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" /> <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="Remark" /> …

Member Avatar for shefeekj
1
174
Member Avatar for Tank50

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 …

Member Avatar for Tank50
0
86
Member Avatar for emhmk1

Hi There, I'm tinkering with an idea of a database structure for the company i work for, i'm currently compiling a client list using mysql and accessing it via php. The problem i have come across yet not solved is, when i search the database for a surname i would …

Member Avatar for emhmk1
0
111
Member Avatar for billymcguffin

hello, the title basically sums it up. how can i see if a word is in a url and then if it is, do something with it. thanks for any help billy

Member Avatar for Airshow
0
564
Member Avatar for DAWNIE

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 …

Member Avatar for DAWNIE
0
203
Member Avatar for daviddoria

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()); …

Member Avatar for siddhant3s
0
100
Member Avatar for goyofoyo

hey I am currently working on a Fraction program and the fraction needs to be in lowest terms i have been working on this for a while and I can't figure out what is wrong with it i think i have been looking at it for too long, but anyways …

Member Avatar for goyofoyo
0
116
Member Avatar for abu taher

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 …

0
57
Member Avatar for bharanidharanit

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 …

Member Avatar for bharanidharanit
0
303
Member Avatar for Ries

[code]<script type="text/javascript"> function counter() { var first; var number; if (first == ""){ var first = 42; var number = 0; }else{ var number = number++; } var full = 7; var length = strlen(number); var full = full - length; for (i=0;i<full;i++){ document.getElementById('counter').innerHTML = document.write('<img src="images/0.gif" border="0">'); } for …

Member Avatar for Ries
0
294
Member Avatar for losh177

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 …

Member Avatar for losh177
0
2K
Member Avatar for rickarro

Hey all, I found this script that i'm using to read a directory, show all the pdf files in it, then be able to click on one of the pdf files displayed and open the pdf. So far i can show the pdfs in the directory, but when I click …

Member Avatar for rickarro
0
131
Member Avatar for dzoch89

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 …

Member Avatar for dzoch89
0
83
Member Avatar for bokz06

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 …

Member Avatar for bokz06
0
109
Member Avatar for Sky Diploma

[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 …

Member Avatar for Dave Sinkula
0
144
Member Avatar for ShadowScripter

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 …

Member Avatar for William Hemsworth
0
931
Member Avatar for suretd

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 …

Member Avatar for suretd
0
115
Member Avatar for Archo

Hello! I am a n00b to both PHP and Javascript, so please bear with me... I have a form and I use Javascript to validate the form. If there is an error on the for it displays the appropriate alert. The problem I have is when I click "OK" on …

Member Avatar for Archo
0
305
Member Avatar for sgweaver

I'm somewhat new to PHP. I'm not sure how to point to the root of my web site in a function. I was using $_SERVER["DOCUMENT_ROOT"], but when I use it in my function it comes back: "http://mywebsite.com/var/www/html/mypath" Note - this is in the HTML - other parts of the function …

Member Avatar for diafol
0
204
Member Avatar for newcpp

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 …

Member Avatar for newcpp
0
7K
Member Avatar for Darkangelchick

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

Member Avatar for jephthah
0
136
Member Avatar for CppBuilder2006

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 …

Member Avatar for CppBuilder2006
0
332
Member Avatar for reisende

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 …

Member Avatar for reisende
0
153
Member Avatar for c_skyscraper

hi guys, I have one table: exams(e_no integer primary key,e_name text); now i want to create another table called questions which should have primary key that is combination of exam.e_no (foreign key) and question.q_no questions(q_no,e_no,questions text); so i would like to make q_no and e_no both act as primary key …

0
76
Member Avatar for bokz06

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for hunterm

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 …

Member Avatar for hunterm
0
119
Member Avatar for ShadowScripter

Greets, A string array in C++ can be initialized, just like everything else. With that in mind, how do you count the number of items in the array? I mean, how many rows? Let me give you an example using Char arrays (having two dimensional since it's not like string) …

Member Avatar for ShadowScripter
0
98
Member Avatar for CommanderOne

Hey, I'm new to the language and was hoping someone could give me a bit of a hand. [language=code]def common_elements(list1, list2): """ Return a list containing the elements which are in both list1 and list2 >>> common_elements([1,2,3,4,5,6], [3,5,7,9]) [3, 5] >>> common_elements(['this','this','n','that'],['this','not','that','that']) ['this', 'that'] """ list3 = [] for item …

Member Avatar for CommanderOne
0
89
Member Avatar for perlguy

I'm trying to append a string to an array value and it doesn't seem to be working. Can someone tell me what I'm doing wrong? The array values will be URLs with a trailing forward slash. [url]http://www.mywebsite.com/Details/product-type/New-York-293486/[/url] $values[10] .= '?cid=spontrue';

Member Avatar for KevinADC
0
126
Member Avatar for kenji

Hey, I have used the LWP:\:Simple module and saved the source of a website in a file. I am trying to extract all the data between the <head> tags and pass it to a variable to process. So far I can't seem to extract the data properly. Any suggestions? [code=Perl] …

Member Avatar for KevinADC
0
168
Member Avatar for Reg74

Here's my function that i call from main. However i'm getting an error "stackType undeclared" Does anyone know what i'm doing wrong ? [CODE="CPP"] template<class Type> void removeX(queueType<Type>& Q) { stackType<Type> stackQ; while (!Q.isEmptyQueue()) { stackQ.push(Q.front()); Q.deleteQueue(); } } [/CODE]

Member Avatar for Reg74
0
91
Member Avatar for clutchkiller

I am writing an app right now that needs winmm.lib. I tried typing winmm.lib in the project properties under the correct section, but kept saying that does not exist. So i did a little research and found that if i type -lwinmm it works. I am using dev-c++. Can anyone …

Member Avatar for clutchkiller
0
115

The End.