49,761 Topics
| |
Hi all, I have started a wiki that I hope to make the "unofficial Daniweb wiki". Its mission is to present short, compilable answers to many commonly asked questions here on the forum. [url]http://programmingexamples.net[/url] I have seeded it with a handful of basic operations. Please feel free to edit, add … | |
Hello eople i never post anything here because i always find a solution to the problem but this one is out of my range, ok so when i want to start a new cons or Win32 app i go normaly to FILE->NEW->PROJECT and click for example console mode and then … | |
I am trying to grab some data after opening a text file with append flag. I am using the following code...but nothing is being printed and program execution is progressing forward. Can anyone point me my mistake... [CODE] fstream outStream("test.txt", ios::app);string testID; cout << "Enter Teacher ID - "; cin … | |
PPPPPPPLLLLLLLZZZZZZZZZZZ tell me which type of logical error does exist in this program.it evaluate numerical expression correctly but the problem is in alphabetic expressions plz tell me the output of a+b & also of a+b*c/d^e so I'll match my output result with Ur answer Ur replies are not satisfying me … | |
Hey, I have the code: [CODE] Form1(void) { array<Label ^>^ labels = gcnew array<Label ^>(itemCount); InitializeComponent(); for (int i = 0; i < itemCount; i++) { labels[i] = (gcnew Label()); labels[i]->Tag = (int)i; labels[i]->Location = Point(1, (i + 1) * 50); labels[i]->Size = System::Drawing::Size(250, 50); this->Controls->Add(labels[i]); } } [/CODE] This … | |
Hi I want to write a file shredder in C++. What I know is that I need to overwrite things with 0 but I am not very much clear on this. What concepts should I know to program it ? | |
Hi Everyone, I'm working in with a file and somewhere in it I'm reading a number that i know it's starting and endig position n the file and then i store it in an string*. But at the end I need to convert this string to the int value. I … | |
He all I am currently working a on a problem to convert the entire contents of an STL container into a string. For example if I had this: [code=c++] int foo[] = {1, 2, 3, 4, 5}; vector<int> bar(foo, foo + 5); [/code] I would like to convert [icode]bar[/icode] into … | |
So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef … | |
Hi, I'm having trouble with my program,here is one of the error code: Error 1 error LNK2019: unresolved external symbol "public: __thiscall linkedListType<int>::linkedListType<int>(void)" (??0?$linkedListType@H@@QAE@XZ) referenced in function "public: __thiscall linkedQueueType<int>::linkedQueueType<int>(void)" (??0?$linkedQueueType@H@@QAE@XZ) main.obj Mesina_Wk5Assignment The following are the codes to my program [CODE] // linkedList.h file #ifndef H_LinkedList #define H_LinkedList #include … | |
I am trying create a button that when clicked prints hello world in the text box above it. however im a complete noob on winforms. I normally just make console programs any tutorials on winforms ? with C++? | |
Hi, I'm trying to create a 2d array that will fill itself up with numbers i have in a text file. My text file looks like this: 1 5 4 2 6 3 3 9 4 4 1 8 5 2 2 So, I want to create an array with … | |
Hello All I’m trying to hook the mouse scroll wheel using SetWindowsHookEx with WH_MOUSE_LL. The callback function I am using operates correctly, and identifies when the mouse wheel is scrolled. However I am unsure of how to identify which direction the mouse has been scrolled. My code so far: [CODE] … | |
if i were to create a program which required the user to enter multiple values, but i do not no how many. How would i go about anticipating the input. For instance if the user were permitted to input any amount of numbers and i wanted to add all the … | |
Hi I started a thread earlier back and I thought my problem had been solved but now new errors have popped up Here are the errors I'm getting: bfs.cc: In function 'void greedyMatch()': bfs.cc:9: error: expected primary-expression before 'for' bfs.cc:9: error: expected `)' before 'for' bfs.cc:9: error: 'bfs_ee' was not … | |
Hi guys, I am stuck with this piece of code for a long time. The errors that come are: bfs.cc: In function 'void greedyMatch()': bfs.cc:9: error: expected initializer before '*' token The relevant code is [code=c] #define forallXNodes(u,G) \ for(arc *bfs_ee=(G.getSource())->firstOutArc(),arc *bfs_stopA=(G.getSource())->lastOutArc(),u=bfs_ee->head(); bfs_ee <= bfs_stopA;u = (++bfs_ee)->head()) #define forallYNodes(u,G) \ … | |
Hi again, After a defeat in Linux in other post (which I'm still finding a way), I have decided to give a shot in windows. However it produces DLL fine and I can use LoadLibrary(). I need it to produce .a file for static linking. How do i do it? … | |
Hey, I have just switched from C#, and in C# there was a way you could create an item (Example), and set parameters. [CODE] Example text = new Example(); Example.parameter = value; //etc [/CODE] I have searched the internet, and could not make any sense of it. Any help would … | |
I'm trying to convert a disassembled Hex Dump to a SPIM friendly assembly file. This requires that I take lines like: [CODE] 004000f8 <_init>: 4000f8: 27bdffe8 addiu sp,sp,-24 4000fc: afbf0010 sw ra,16(sp) 400100: 0c100064 jal 400190 <call_gmon_start> 400104: 00000000 nop 400108: 0c100094 jal 400250 <frame_dummy> ... [/CODE] and make them: … | |
Is there a good way to determine the end of a a line in a text file? I need to find of end of a line in text because all text lines are of different length. I also have to store each word (separated by spaces) into a vector. [CODE] … | |
| A question has been knocking my mind today,is it possible to convert a executable file back to its source code in c++?? |
Hi everyone, Somewhere in my need i need to create strings like ( x,y,z ) with 0<x,y,z<N. I was trying to use 3 for loops but it didn't work. That's what i wrote: for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ for(int k=0;k<N;k++){ string t="( "; t+=i; t+=","; t+=j; t+=","; t+=k; t+=" )"; } … | |
hi! i have a class from which other classes are inhertited. I then create a function GetInput() & I want it to funtion for evry object inherited by MAIN. I don't want to create separate functions for each. Is there any way for it? Thank you. | |
i have a Header file that i will be using for multiple programs. this file specifies integers (its for my calculator programs). is it possible to have an integer value represented as AB if the two other integers are represented as A & B without getting a compiling error? EX. … | |
How can write out rep sign (\) ? cout << "???"; | |
This problem originates from a job interview which could be solved in C++ or C#. As far as I can remember it was to implement a queue that can be added to by multiple threads and accessed by multiple threads. I haven't tried it in C# yet although I think … | |
I'm working on a problem where I am trying to validate the user input to verify only digits have been used. I'm trying to use the ASCII code to do so, but I'm stuck. I would greatly appreciate any help that can be provided. Thank you in advance!!! *Delilah* [CODE]#include … | |
I downloaded OpenCV last Wednesday and tried to link it with DevC++ I followed the instructions found [URL="http://www.cypax.net/tutorials/opencv/index?language=en"]here[/URL] and I get the error cannot find -lhighgui ld returned 1 exit status I'm sure the code that I tried to compile is working because I previously compiled and ran that code … | |
code not working [code=c++] #include<iostream> using namespace std; typedef struct node{ int data; struct node *next; struct node *previous; }mynode; mynode *head,*temp,*current,*tail; void add(int data); int main() { head=NULL; tail=NULL; add(1); cout<<"added 1"<<endl; add(2); add(3); add(4); } void add(int data) { temp=(mynode*)malloc(sizeof(mynode)); temp->next=NULL; temp->previous=NULL; if(head == NULL) { head=temp; tail … | |
Hello I just started programming and managed to make some programs, but what I don't get is when I get these errors: Compiler: Default compiler Executing gcc.exe... gcc.exe "D:\Documents and Settings\Riikard\Desktop\Untitled1.c" -o "D:\Documents and Settings\Riikard\Desktop\Untitled1.exe" -g3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3 D:\Documents and Settings\Riikard\Desktop\Untitled1.c:1:20: iostream: No such file or directory D:\Documents and … |
The End.