Forum: C++ Sep 2nd, 2008 |
| Replies: 1 Views: 926 Hey! :)
I found the functions in the chilkat-library usefull, so i downloaded it. If you havn't figured it out yet, I use the programming language C++ and i use the visual studio express IDE.
... |
Forum: C++ Apr 16th, 2008 |
| Replies: 7 Views: 508 Shouldn't the equal number be placed random, not on the side of each other? It's pretty easy to guess where the other 2 is if you have found the first.. :) |
Forum: C++ Apr 16th, 2008 |
| Replies: 12 Views: 2,431 This is bloody creepy! :)
I moved the file to \\..\\..\\..\\..\\..\\..\\..\\data
It worked. And, you were right, it stops at the erase-loop.
The reason why it stopped, was that i tried to... |
Forum: C++ Apr 16th, 2008 |
| Replies: 12 Views: 2,431 Well, the MyFile-object has so many details in it, so I can't see if it's opened, but this is the MyFile line in watch:
Since the program is located in "C:\Users\Arne\Documents\Visual Studio... |
Forum: C++ Apr 16th, 2008 |
| Replies: 7 Views: 508 I don't think I really understand. Is it? How could for example the array be?
Will the user enter the coordinates for the numbers they're targeting? So they could for example enter "1,4" and... |
Forum: C++ Apr 16th, 2008 |
| Replies: 12 Views: 2,431 Well, I used VC++ 2008 Express, and it compiles fine, and it don't crash.
What's strange, is that, if I add "cout << an;" in the start of the function, it prints an. But if I type it inside the... |
Forum: C++ Apr 15th, 2008 |
| Replies: 12 Views: 2,431 Okay, this is what I've done for now:
http://pastebin.com/m2aa328fb
1: It somehow works, but not as expected.
2: the info-vector (defined in main()) info[0] will allways be "empty".
Anyone? |
Forum: C++ Apr 15th, 2008 |
| Replies: 11 Views: 1,376 No problem! :)
I would recomend msdn.com, cppreference.com, cplusplus.com and first of all, google.
If you want to delete a file, google this:
"C++ delete file" |
Forum: C++ Apr 15th, 2008 |
| Replies: 11 Views: 1,376 It's because SYSTEMTIME is defined in Windows.h. Do you need the program to run in other operative systems? |
Forum: C++ Apr 15th, 2008 |
| Replies: 11 Views: 1,376 You don't need to include time.
You can delete files from for example C: with this:
system("Del \\..\\..\\asdfbaowgsbnlwergsfhgkldnh.sgasgraslk");
But why don't you use remove? I don't know... |
Forum: C++ Apr 15th, 2008 |
| Replies: 11 Views: 1,376 #include <stdio.h>
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
SYSTEMTIME st;
GetSystemTime(&st);
cout << st.wDayOfWeek;
cin.get(); |
Forum: C++ Apr 15th, 2008 |
| Replies: 12 Views: 2,431 Not even this would work!:
int main()
{
string *ptr = &getInfo("5656")[0];
cout << *ptr;
return 0;
} |
Forum: C++ Apr 15th, 2008 |
| Replies: 11 Views: 1,376 Well, without testing, I think this would give you the day:
#include <stdio.h>
#include <time.h>
int main()
{
SYSTEMTIME st;
GetSystemTime(&st);
return 0; |
Forum: C++ Apr 15th, 2008 |
| Replies: 12 Views: 2,431 Okay, I've changed the erasing part to this:
for (int x = 0; x != vec.size(); x++)
{
vec[x].erase(vec[x].length()-1);
vec[x].erase(0,1);
}
And it compiles. |
Forum: C++ Apr 15th, 2008 |
| Replies: 12 Views: 2,431 Thanks, but after changing:
str[i] to if (vectorOfInformation[iter][i] == ')')
And inserting vec.resize(5,"");
...it still doesn't work. |
Forum: C++ Apr 15th, 2008 |
| Replies: 12 Views: 2,431 Hi!
I have this function (well, it's pretty good explained in the code-tag, but okay.) which is supposed to see if a string is found first in a line in a text file. Anyway, this code gives the... |
Forum: C++ Apr 9th, 2008 |
| Replies: 1 Views: 442 Hello!
Is there any way that I could create a loop that will user the content from a text-file and the number of lines? I want to go through a file and look for something, and then I need to use... |
Forum: C++ Apr 7th, 2008 |
| Replies: 2 Views: 3,197 |
Forum: C++ Apr 7th, 2008 |
| Replies: 2 Views: 3,197 Hello! :)
I'm having some trouble including header files in my project. This is my three files:
main.cpp:
#include <iostream>
#include <string>
#include "functions.h" |
Forum: C++ Apr 4th, 2008 |
| Replies: 9 Views: 919 Thank you very much for your help! :)
EDIT: Do anyone know how to delete the first and last character from a string? |
Forum: C++ Apr 4th, 2008 |
| Replies: 9 Views: 919 :)
When you ask in that way, I'm sure you're right, hehe, but I thought the first IF would "refuse" an ')' to continue. |
Forum: C++ Apr 4th, 2008 |
| Replies: 9 Views: 919 Why is the if (str[i] == ')') inside if (str[i] != '(' || str[i] != ')')?
A ')' won't slip through to the second if. |
Forum: C++ Apr 4th, 2008 |
| Replies: 9 Views: 919 Okay, thanks for answering, but how can i make the *PointerTOElement to point one element higher then? |
Forum: C++ Apr 4th, 2008 |
| Replies: 9 Views: 919 Hello!
I have a string which may look like this:
(arne kristoffer)(1231232)(12.12.12)(asdasdf 12)
This is just an silly example, but never mind.
THe point is that i need to seperate the... |
Forum: C++ Apr 4th, 2008 |
| Replies: 3 Views: 3,755 Thank you very much, this solved the problem! :)
Have a nice weekend!
Arne Kristoffer |
Forum: C++ Apr 4th, 2008 |
| Replies: 3 Views: 3,755 Hello! :)
I'm having a problem while comparing one character from a string with a ... string.
This is a part of a pretty complex loop (or, it's complex for me, since I'm new to C++ and... |