132,726 Archived Topics
Remove Filter ![]() | |
Hello I'm doing my OS homework and I need to know how to read an write a 32 bit integer with the write system call Here is the code that I wrote: [code] #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include<unistd.h> #include<string.h> struct Person { char name[21]; int ch_in_name; char address[21]; … | |
Hello again. Thanks to all that contributed positively to my first thread. it went a long way. Now, i am here again. can someone please help me out in the case of vectors.i.e. [#include<vector>]? Please do not be angry at me for posting such oversimple questions,i am a dumb beginner … Software Development c++ | |
Hello! Well, I need an alternative to be able to delete files not accessed for more than 5 minutes. I already know how to do this using the system programs, but wanted something done in C++ once, to avoid bottlenecks. Is there any way to do this? (if not understand, … Software Development c++ | |
I'm trying to learn C++ on my own so I figured I'd try to write a program for my data communications class. We were learning about hamming codes and I want to try to make a program that will let me do it automatically instead of on paper. I'd take … Software Development c++ | |
I am trying to reference a 2d dynamic array which i used pointer to pointers to declare. the constructors run without a problem but as soon as i run another function or an overloaded operator i get errors. Its almost like i am referencing the array in the pointers incorrectly. … Software Development c++ | |
Hey, So I am trying to get several numbers (below ) to be stored in various variables. Could you look at my code and tell me what I am messing up? (trying to emulate an example from class that I missed, stupid swine flu...)) the numbers (yes there is a … Software Development c++ | |
I have a file that consists of dates like this: 12/[B]01/[/B]2008 12/[B]02[/B]/2008 12/[B]03[/B]/2008 12/[B]04[/B]/2008 12/[B]05[/B]/2008 Now if I will read this file from beginning to end, this is a solution: [code] String^ FilePath = "C:\\DateFile.txt"; String^ GetLine = ""; StreamReader^ Read = gcnew StreamReader(FilePath); while(Read->Peek() >= 0 ) { GetLine … Software Development c++ file-system | |
01 Why i am not able to do this [CODE]int* px; px = new int[2][2]; [/CODE] other the [ICODE]px = new int[2*2];[/ICODE] is there any other method 02 Why i am not able do access through pointer dx by [ICODE]dx[1][2][/ICODE] other than by using [ICODE]dx[1*7+2][/ICODE] [CODE=cpp] static float mat[5][7] = … Software Development c++ | |
Hi, I'm trying to implement my own allocator using malloc and free. One thing what interests me is that in declaration of deallocate in addition to pointer we have also parameter size which suppose to be size of elements allocated with allocate but having implemented my deallocate as this: [code=c++] … Software Development c++ motherboards-cpu-ram | |
Hi, <--- Newbie I am trying to install the Boost libraries, specifically the Boost filesystem library. Many of the libraries are header-files only. No building. The Filesystem library requires me to build binaries... A new challenge, but I was able to pull it off. However, the binaries are located in … Software Development c++ | |
Hi , I recently read this on another forum... [Quote] C/C++ are still standards for writing fast, standalone software, so you'll be wanting to work your way there. [/Quote] If I want to develop an application that has many "if statements" and many "loops" , that executes only on the … | |
Hello. I'm having a hard time finding which block of code in this program is [B]"insert in the middle"[/B] for Link List, so I can study it. Can someone point out where it is in the program and if insert head code below is included in insert middle. Much appreciate … Software Development c++ | |
Hi All! I have a doubt about returning reference. I'll show you an example: [CODE] Vector &MakeVector() { Vector *result = new Vector<Dim>(); /*some more code*/ return *result; } [/CODE] now I can call the function MakeVector to assign it result in this two ways: [CODE] Vector v = MakeVector(); … Software Development c++ motherboards-cpu-ram | |
Hi,I want to convert String^ to Int array or a char array.I am reading numbers from a file in GUI but the StreamReader Reads the Text in a String.I need to convert them to use the numbers. I have tried ToCharArray() function but it doesnt work! this function gives the … Software Development c++ gui visual-studio | |
Anyone could help this? I am using a MSVC++ compiler.. Thanks a lot.. Software Development c++ | |
is there a way to convert a java.util.Date to format dd/mm/yyyy HH:mm:ss ? Software Development java | |
This program kinda works, but I have one problem. I setup this program to display a message when someone enters a negative number, but I how do I set the count back to zero. Even though mesage prompts the user that a negative number is invalid, it still calculates the … | |
Is there good open source solution allowing to use shared memory between C/C++ and Java Software Development java open-source | |
...Can anybody knows how can I put a table on what type of Package type (overnight and two day package) in my program.. Since I have been troubled on how I would like to display my added data to an array and if I have choose a certain package type … Software Development display java java-swing | |
I added a bachground color to a jpanel using [B]panel.setBackGround(Color.GRAY);[/B] I want to add some color like "[B]light blue[/B]." which do not have in the color list. how can I do. (2) how to add backgroud picture to jpanel???? (tried using [B]setBackGround[/B] but failed!!!) thankx in advance.... Software Development java | |
I am suppose to be making a program which inputs an employees name(first and last) and their quarterly sales. I am then suppose to output a table of all the employees and the quarterly sales, as well as their total sales. I am suppose to create an array of objects … Software Development java | |
I am using textpad to create my java programs because I had a problem with downloading java and setting the path in order to use it with notepad. Can someone tell me what this error mean? I don't know if it has something to do with the fact that I … Software Development java | |
I wrote the below code and when I try to compile it I get the following error: error C2109: subscript requires array or pointer type. Can anyone tell me what I did wrong and how I can fix it? Thanks a lot! :) [CODE] // This program writes the bombsweeper … Software Development c++ | |
this is a c++ program for the simulation of gillians island i did. im a newbie in programming looking to improve on my skills. Can some assist me on how to break this code into functions. please dont rewrite the code i need just a sampler from code i can … Software Development c++ | |
Alright, so the assignment which im sure you guys have seen around alot is to do a powerball type program, 1-55 for the first 5 numbers then the 6th 1-42. I set up the program, i get my random numbers. but the teacher wants you to assign a single variable … Software Development c++ | |
Thanks to the help I recieved earlier, I figured out how to make my other header file and my other .cpp file!! So thank you for that. I am now trying to compile all of my files together, and am getting quite a few linker errors, even though the functions … Software Development c++ | |
Hey, im looking for a good C++ IDE on Linux. Wanted features: Integrated debugger support Code formatting Syntax highlighting etc.. I hate code folding and that auto-bracket thing Preferably one thats fast. I tried Eclipse CDT but it crashed all the time and i didn't like it. I get on … Software Development c++ ide java-netbeans | |
hello there, I have a bit of trouble figuring out how to finish a code for an assignment. I'm supposed to write a class that can generate a sequence of psudorandom integers using the linear congruence method. The trick of it is that the number generated will become the new … Software Development java | |
c:\documents and settings\administrator.rahulabbine44fd\desktop\cs340 proj1\cs340 proj1\binarytree.cpp(27) : error C2143: syntax error : missing ';' before 'BinaryTree<E>::getNode' in cpp file template <class E> nodePtr BinaryTree<E>::getNode(E item){ nodePtr<E> temp = new nodePtr; temp->data = item; return nodePtr; } in headr file: struct node; typedef node *nodePtr; struct node { E data; nodePtr left; … Software Development c++ | |
Hi all, I have a question here.. I am using microsoft visual C++ 6.0 with SP4 and SP5.. I call a `DoModal()`, but there was nothing dialog show out.. below are my codes.. CDlgA oDlgA; oDlgA.DoModal(); but no dialog show out.. then I trace the debug code, found out that … Software Development c++ | |
Hello, and thank you for taking the time to help me! This is my first real program in C++, and I am still getting used to the differences between C and C++, so I still really don't know what I'm doing. I am working on a header file and its … Software Development c++ | |
Hello, I am trying to read the contents of a text file from a website. I am running Visual Basic 6 (SP6). I need to add this code to an existing application written in VB6, so VB.NET is out. The file I want to read is on our website. It … Software Development file-system vb.net visual-basic | |
Ok my script takes a list of files picks out all jpgs and stores it in files[] now the problem is how do I display all thous images in tk gui window below is what i have that works for 1 image how do i make this work for basically … | |
Hi I am new to C# and software development. I have a question. If I were to edit this project: [url]http://xmlnotepad.codeplex.com/SourceControl/ListDownloadableCommits.aspx[/url] I think I need to: Download Eclipse with C# plugin Download source code of the project Create a new C# project in Eclipse Copy source code into Eclipse Did … Software Development c# | |
Hi! I'm running Ubuntu 9.04 and using Code::Blocks as C++ IDE. I have the following code: Temp.h: [CODE]#ifndef TEMP_H_INCLUDED #define TEMP_H_INCLUDED template <typename T> class Temp { public: Temp (T d = T(0)): _dato(d) {} T getDato () const; void setDato (T d); private: T _dato; }; template class Temp<double>; … | |
![]() | Hey there good folks! :) I am working on a thread task called, Lab Alarm, and I am nearly done with it. We're suppoosed to work with the "producer-consumer" problem and It's just teacher code that one is supposed to modify and add some own to it. Now, I am … Software Development java |
Hello, I am working on a plain old simple text version of a memory game. The player will be able to match letters of the alphabet by clicking on various numbers. For example This is what the player will see: 123 456 789 but underneath that will be something like: … Software Development java | |
My professor likes to give us tests on topics we've not covered yet, like string stream :o This program uses stringstream objects to make sentences like the Mad Lib ™ game. Create 4 string objects: noun, adjective, verb, and adverb. You will need these functions: AskNoun, AskVerb, AskAdjective, AskAdverb, and … Software Development c++ | |
Alright, so I'm a bit lost as to what to do next with this and am looking for some direction. The assignment sheet is as follows: [QUOTE]CSC 265 – Fall 2009 – Program 1 Due: Thursday October 8, 10 minutes before class starts Write a header file, implementation file, and … | |
I have a noobish question. If you have a nested try-catch block and an exception is thrown in the inner catch block, will the outer catch block catch it? Example: [code=java] try { // All this code is random. It doesn't int x = 5; // have anything to do … Software Development java | |
Hi :) I have this assignment for my first year programming module and one of the questions asks for a void function using string parameters. This confused the hell out of me, but I came up with this idea. Would someone please, please, please have a look at it and … Software Development c++ | |
Hi all, Here is the problem; I’m trying to make two threads draw pixels in two different memory spaces at the same time. Nothing fancy, just a test program to learn about thread programming. I allocate the memory, send the address as parameters to the two threads, and in each … Software Development c++ | |
Im working on a project and i'm stuck on the best route to take in designing a feature. Rather than go into detail about the actual project i'll use a simple example since the concepts are the same :) I have a panel on a form, the panel contains 100 … Software Development | |
im lost making a code that runs this. it has to include "while" command but im having difficulty with the counter vs the name =/ can someone help [COLOR="Green"] Enter your friend’s name(stop to quit):john Enter your friend’s name(stop to quit):megan Enter your friend’s name(stop to quit):stop Congratulations you have … Software Development c++ | |
Public Sub ValidateID(ByVal IDno As String) Dim a As Integer = 0 For i As Integer = 0 To 5 a += CInt(ID.Substring(i * 2, 1)) Next Dim b As Integer = 0 For i As Integer = 0 To 5 b = b * 10 + CInt(ID.Substring(2 * i … Software Development vb.net | |
hii i have problem with the line [CODE]CopyFile ("\\svchost.exe","c:\\%windir%\\svchost.exe",0);[/CODE] i have already tryed to put _T before ( but he won't compile CopyFileW' : cannot convert parameter 1 from 'const char [13]' to 'LPCWSTR' i want that copyfile the file copies to the windows map srry for bad english [CODE]TCHblabla … Software Development c++ microsoft-windows | |
I have to write a program for my assignment that does a quote. It has to have a void function that validates a string and and integer entered. Other wise I would have solved the problem with a simple menu and integers. The entries has to be one of five … Software Development c++ | |
I have two threads that need to use one variable. They run forever and constantly needs the updated value of the variable. Now I am aware of the race condition and am using synchronized. However, the two threads are of different classes and I don't think synchronized is quite effective. … Software Development java |
The End.